I have made a corrplot of a dataframe df.Unfortunately the corrplot doesn't fit the screen. The top of the corrplot is missing. How can I make it fit in the screen?
My corrplot does not fit in the screen?
Asked Answered
(I'm a co-developer of corrplot) Recently, I fixed several old bugs from our issue tracker and rendering of top labels was among them. This has been fixed in version 0.82. You can wait until we submit it to CRAN, or you can immediately install it from my development fork:
devtools::install_github("vsimko/corrplot")
Since 0.82, the rendered output looks like this:
library(corrplot)
M <- cor(mtcars)
corrplot(M, order = "hclust", addrect = 3)
If I specify the margins using mar as part of corrplot it works for me.
library(corrplot)
M <- cor(mtcars)
corrplot(M, method="circle", mar=c(1,1,1,1))
corrplot(M, method="circle", mar=c(3,3,3,3))
The order for the margins is bottom, left, top and right.
Works for me if I specify upper too
corrplot(M, method="circle", mar=c(3,3,5,3), type = "upper")
© 2022 - 2024 — McMap. All rights reserved.
par(.)
nor when called from within thecorrplot(.)
function. For the first, it does not affect anything while for the latter it increases the margin but still cuts off the labels. Interestingly, this issues appears for me not withcorrplot(... , type = "full")
but withtype = "upper"
. The only dirty workaround I could figure so far is to fiddle with the window size of the created plot. – Karole