My corrplot does not fit in the screen?
Asked Answered
S

2

7

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?

Scaly answered 23/5, 2016 at 10:56 Comment(0)
M
3

(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)

enter image description here

Metallophone answered 10/2, 2017 at 15:46 Comment(0)
C
0

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")
Cubeb answered 23/5, 2016 at 11:47 Comment(1)
Did you test your proposed solution? I do have the same problem as @user5543269. However, setting the 'mar' argument does neither do the trick for par(.) nor when called from within the corrplot(.) 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 with corrplot(... , type = "full") but with type = "upper". The only dirty workaround I could figure so far is to fiddle with the window size of the created plot.Karole

© 2022 - 2024 — McMap. All rights reserved.