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

Wrong colors in the release 0.87 #166

Closed
ftucos opened this issue May 10, 2021 · 3 comments
Closed

Wrong colors in the release 0.87 #166

ftucos opened this issue May 10, 2021 · 3 comments
Assignees
Labels

Comments

@ftucos
Copy link

ftucos commented May 10, 2021

Hi, I think there's some kind of bug in the latest release. I have the following correlation matrix (It seems I can't replicate the error with a small randomly generated matrix)

corr <- matrix(c(
  c(1.00,0.45,0.24,0.04,-0.03,0.12,-0.05,0.51,0.03,0.26,0.37,0.24,0.14),
  c(0.45,1.00,0.11,0.13,0.11,0.23,-0.12,0.60,-0.08,0.26,0.38,0.28,0.11),
  c(0.24,0.11,1.00,-0.07,0.11,0.06,-0.09,0.10,0.06,0.35,0.16,0.21,0.27),
  c(0.04,0.13,-0.07,1.00,-0.14,0.05,-0.26,0.30,-0.22,0.08,0.37,0.13,0.15),
  c(-0.03,0.11,0.11,-0.14,1.00,0.03,0.08,-0.06,0.00,0.08,-0.10,-0.07,0.01),
  c(0.12,0.23,0.06,0.05,0.03,1.00,-0.23,0.28,-0.08,0.29,0.20,0.39,0.26),
  c(-0.05,-0.12,-0.09,-0.26,0.08,-0.23,1.00,-0.26,0.02,-0.38,-0.33,-0.32,-0.39),
  c(0.51,0.60,0.10,0.30,-0.06,0.28,-0.26,1.00,-0.06,0.39,0.64,0.44,0.18),
  c(0.03,-0.08,0.06,-0.22,0.00,-0.08,0.02,-0.06,1.00,-0.02,-0.10,0.00,-0.04),
  c(0.26,0.26,0.35,0.08,0.08,0.29,-0.38,0.39,-0.02,1.00,0.44,0.52,0.54),
  c(0.37,0.38,0.16,0.37,-0.10,0.20,-0.33,0.64,-0.10,0.44,1.00,0.39,0.20),
  c(0.24,0.28,0.21,0.13,-0.07,0.39,-0.32,0.44,0.00,0.52,0.39,1.00,0.43),
  c(0.14,0.11,0.27,0.15,0.01,0.26,-0.39,0.18,-0.04,0.54,0.20,0.43,1.00)),
  ncol = 13, dimnames = list(LETTERS[1:13], LETTERS[1:13]))

With version 0.84 of corrplot, everything is fine and I get the following plot:

devtools::install_version("corrplot", version = "0.84", repos = "http://cran.us.r-project.org")`
library("corrplot")
corrplot(corr)

image
With the latest update, colors are messed up:

.rs.restartR() 
 devtools::install_version("corrplot", version = "0.87", repos = "http://cran.us.r-project.org") 
 library("corrplot") 
 corrplot(corr)

image

@taiyun
Copy link
Owner

taiyun commented May 10, 2021

@ftucos you can get the correct plot by setting full_col = FALSE

The bug was from #122 .

I will fix it soon.

taiyun added a commit that referenced this issue May 10, 2021
@taiyun
Copy link
Owner

taiyun commented May 10, 2021

Thanks.

I have removedfull_col and will update to CRAN soon.

@taiyun taiyun closed this as completed May 10, 2021
@taiyun
Copy link
Owner

taiyun commented May 11, 2021

Solved now. Please try the latest version on github.

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

No branches or pull requests

3 participants