Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hide grid when plotting a large matrix #42

Closed
vsimko opened this issue Mar 15, 2016 · 6 comments
Closed

How to hide grid when plotting a large matrix #42

vsimko opened this issue Mar 15, 2016 · 6 comments

Comments

@vsimko
Copy link
Collaborator

vsimko commented Mar 15, 2016

This might be a bug, inconsistent API, missing feature or bug in the documentation.

In corrplot.mixed.R the parameter addgrid.col is documented as:

#' @param addgrid.col The color of grid, if \code{NULL}, don't add grid.

In corrplot.R the parameter addgrid.col is documented as:

#' @param addgrid.col The color of grid. The default value is depends on
#'   \code{method}, if \code{method} is \code{color} or \code{shade}, the
#'   default values is \code{"white"}, otherwise \code{"grey"}.

It looks like it should be possible to use addgrid.col to disable the rendering of the grid.
But it does not work. See the following code snippet:

M <- matrix(runif(2500, 0.5, 1), nrow = 50)
corrplot(M, method = "color", cl.pos = "n", tl.pos = "n", addgrid.col = NULL)

image

However, I would like to generate something like this:
image

@taiyun
Copy link
Owner

taiyun commented Mar 16, 2016

M <- matrix(runif(2500, 0.5, 1), nrow = 50)
corrplot(M, method = "color", cl.pos = "n", tl.pos = "n", addgrid.col = NA)

@vsimko
Copy link
Collaborator Author

vsimko commented Mar 16, 2016

Thanks, it works !
It means, that the @param addgrid.col documentation in R/corrplot.mixed.R and R/corrplot.R needs some update.

@taiyun
Copy link
Owner

taiyun commented Mar 16, 2016

YES. Many thanks for your passion and great job!

@vsimko
Copy link
Collaborator Author

vsimko commented Mar 16, 2016

It looks like that current API works as follows:

  • addgrid.col = NA : no grid is rendered
  • addgrid.col = NULL : chooses color based on the method parameter
  • addgrid.col = <string or number> : renders the grid with user-defined color

And I'm not sure if it is a feature or a bug.

@taiyun
Copy link
Owner

taiyun commented Mar 16, 2016

YES.

It's a feature:)

vsimko added a commit that referenced this issue Mar 16, 2016
@vsimko
Copy link
Collaborator Author

vsimko commented Mar 16, 2016

fixed in #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants