减少R

时间:2018-03-13 00:08:36

标签: r r-corrplot

我有一个1行2列图,我需要在报告中插入。当我插入图表时,我注意到两个相关图周围都有一个很大的白色区域。在corrplot函数中是否有一个参数来减少这个?我已经阅读here关于使用knitr钩子函数来裁剪pdf但是这个桥梁对我的编码能力来说太过分了。我已经弄乱了像omi和mai这样的par()参数但是当我将图像导出到TIFF时,我仍然会得到一个巨大的空白区域。

我的代码到目前为止看起来如下,请注意这是从各种来源一起被黑客攻击,并且可以找到两个相关矩阵的输出herehere

col <- colorRampPalette(c("#BB4444", "#EE9988", "#FFFFFF", "#77AADD", "#4477AA"))

par(mfrow=c(1,2),omi=c(0,0,0,0),mai=c(0.1,0.1,0.1,0.1))

corrplot(LX0088U21A1_24hrCor, method = "color", col = col(200),
         type = "upper", order = "original", number.cex = 0.85,
         addCoef.col = "black", # Add coefficient of correlation
         tl.col = "black", tl.srt = 90,
         number.digits = 1,
         # Text label color and rotation
         # hide correlation coefficient on the principal diagonal
         diag = FALSE,
         #title = "Intraday Correlation LX0088U21A1",
         mar=c(0,0,1,0))
legend(0.5,5,ncol = 1, cex = 1.5,legend = "(a)", box.lwd = 0, box.col = "white")

corrplot(LX0088U09A3_24hrCor, method = "color", col = col(200),
         type = "upper", order = "original", number.cex = 0.75,
         addCoef.col = "black", # Add coefficient of correlation
         tl.col = "black", tl.srt = 90,
         number.digits = 1,
         # Text label color and rotation
         # hide correlation coefficient on the principal diagonal
         diag = FALSE,
         #title = "Intraday Correlation LX0088U09A3",
         mar=c(0,0,1,0))
legend(0.5,5,ncol = 1, cex = 1.5,legend = "(b)", box.lwd = 0, box.col = "white")

非常感谢任何帮助。

enter image description here

0 个答案:

没有答案