taiyun / corrplot

A visual exploratory tool on correlation matrix
https://github.com/taiyun/corrplot
Other
316 stars 86 forks source link

wrong colors if all correlations > 0 #152

Closed joqb closed 3 years ago

joqb commented 4 years ago

Hello Viliam and Taiyun,

Very nice package but I have noticed an issue: if I have both negative and positive correlations, everything is fine corrplot_colors_fitting

But if the correlations are all positive, it seems that the color scale is adjusting to the min and max correlations and not to the range displayed in the legend: corrplot_wrong_colors

The code I am running is X=na.omit(DH_pheno_pop1[,3:6])

corrplot(cor(X), method="color", col=col(200), type="upper", order="hclust", addCoef.col = "black", tl.col="black", tl.srt=45, p.mat = cor.mtest(X), sig.level = 0.01, insig = "blank", diag=FALSE )

I am using corrplot 0.85 in RStudio 1.2.5001 and R 4.0.0.

Cheers

taiyun commented 3 years ago

Thanks. I have removed full_col, it works now.