taiyun / corrplot

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

Problems rendering when title is included #117

Closed nitingupta2 closed 3 years ago

nitingupta2 commented 7 years ago

I've been using corrplot in a shiny app while naming the plot with the title argument. In version 0.77 I found mar = c(1,0,2,0) to work well, otherwise the plot or text labels were getting truncated from the top. The new version 0.84 has the same rendering issue and no mar setting works properly, so I had to downgrade to version 0.77.

Please try your unit tests with the title argument, to replicate the issues.

vsimko commented 5 years ago

Could you provide a minimal example showing the problem (code + screenshots) ?

cwilso6 commented 5 years ago

Here is a reproducible example

data(mtcars) M <- cor(mtcars) set.seed(0)

different color series

col1 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "white", "cyan", "#007FFF", "blue","#00007F")) col2 <- colorRampPalette(c("#67001F", "#B2182B", "#D6604D", "#F4A582", "#FDDBC7", "#FFFFFF", "#D1E5F0", "#92C5DE", "#4393C3", "#2166AC", "#053061")) col3 <- colorRampPalette(c("red", "white", "blue")) col4 <- colorRampPalette(c("#7F0000", "red", "#FF7F00", "yellow", "#7FFF7F", "cyan", "#007FFF", "blue", "#00007F")) wb <- c("white", "black")

par(ask = TRUE)

different color scale and methods to display corr-matrix

corrplot(M, method = "number", col = "black", cl.pos = "n")

Screen Shot 2019-07-25 at 2 28 12 PM