如何更改相关矩阵图的边距?

问题描述 投票:2回答:1

我找不到任何选项来扩展corrplot.mixedcorrplot包中生成的绘图的边距。任何建议将不胜感激!

library(corrplot) 
cor_matrix <- structure(c(1, 0.31596392056465, -0.120092224085334, -0.345097115278159, 
                          0.31596392056465, 1, 0.158912865564527, -0.606426850726639, -0.120092224085334, 
                          0.158912865564527, 1, -0.134795548155303, -0.345097115278159, 
                          -0.606426850726639, -0.134795548155303, 1), .Dim = c(4L, 4L), 
                        .Dimnames = list(NULL, c("var_1", "var_2", "var_3", "var_4")))

corrplot.mixed(cor_matrix, order = "AOE", upper = "ellipse", lower = "number", 
               tl.cex = 2, cl.cex = 2, number.cex = 2)
r plot margin correlation r-corrplot
1个回答
0
投票

回答我自己的问题,为未来的读者

library(corrplot) 
library(scico)

col4 <- scico(100, palette = 'vik')
filetag <- "corrplot_result.png"

png(filetag, height = 800, width = 800)

  corrplot.mixed(cor_matrix, order = "AOE", upper = "ellipse", lower = "number", 
                 upper.col = col4, lower.col = col4,
                 tl.cex = 2, cl.cex = 2, number.cex = 2)
dev.off()

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.