user5543269
user5543269

Reputation: 137

My corrplot does not fit in the screen?

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?

Upvotes: 7

Views: 11972

Answers (2)

Viliam Simko
Viliam Simko

Reputation: 1841

(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

Upvotes: 3

adkane
adkane

Reputation: 1441

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

Upvotes: 0

Related Questions