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

full_col=TRUE causes color/legend mismatch #157

Closed
mkanai opened this issue Oct 26, 2020 · 4 comments
Closed

full_col=TRUE causes color/legend mismatch #157

mkanai opened this issue Oct 26, 2020 · 4 comments

Comments

@mkanai
Copy link

mkanai commented Oct 26, 2020

Hi, I found a bug due to a new default argument full_col=TRUE which causes color/legend mismatch.

# CRAN version, v0.84, works
install.packages("corrplot")
library(corrplot)
corrplot(cor(mtcars)/2)

# GitHub version, v0.85, doesn't work
devtools::install_github("taiyun/corrplot")
library(corrplot)
corrplot(cor(mtcars)/2)

I think the correct default behavior is either the following A) or B). Although I found a good use case in #122, I'd like to suggest making full_col=FALSE as a default for backward compatibility. It might be also a good idea to warn users when they set full_col=TRUE but didn't specify cl.lim or is.corr=FALSE.

# A) correct 0-1 color and legend
corrplot(cor(mtcars)/2, full_col=FALSE)

# B) correct full-range color and legend 
corrplot(cor(mtcars)/2, full_col=TRUE, is.corr=FALSE)

@taiyun
Copy link
Owner

taiyun commented May 10, 2021

Yes, I have removed full_col just now.

For #122, I will find a better way to solve it.

@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.

@mkanai
Copy link
Author

mkanai commented May 11, 2021

Great, thank you!

@taiyun
Copy link
Owner

taiyun commented May 12, 2021

@mkanai on CRAN now. corrplot v0.88

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

No branches or pull requests

2 participants