可视化中增加 corrplot 绘图区域

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

如何增加 corrplot 的绘图区域以实现更好的可视化(即,使图形更大)

我使用以下代码来获取 corrplot

cor_5 <- rcorr(as.matrix(datos))
M <- cor_5$r
p_mat <- cor_5$P

corrplot(M,type = "lower",p.mat = p_mat, order = "original", sig.level = c(0.001, 0.01, 0.05), pch.cex = 0.9, 
         insig = 'label_sig',diag = FALSE, col = brewer.pal(n=8,name = "RdYlBu"), tl.col = "black", tl.cex = 0.8, tl.srt = 45,mar = c(0,7,7,0))

这是我得到的图像

enter image description here

我的变量的真实名称稍大一些(2-3 个单词),并且绘图区域的最终大小较小。我怎样才能使用整个可视化区域?

r r-corrplot
1个回答
0
投票

datos
对象对我不可用,也无法通过可重现的示例生成它。

corrplot
包依赖于基础R,这意味着您可以使用
par()
mar()
oma()
等函数控制绘图区域(尤其是边距)。 在 R 图库中可以找到非常详细的解释。

您需要在使用 corrplot 绘图之前

运行这些命令。

最好的,

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