7

我已经使用了如下的 corrplot,但是正如您所看到的,我需要放大圆圈内数字的字体大小,然后绘图标题的位置和字体大小不正确(不完全可见),但我找不到他们的参数。如果您能提供帮助,我将不胜感激。

library(corrplot)

png(height=1200, width=1200, file="overlap.png")

col1 <-rainbow(100, s = 1, v = 1, start = 0, end = 0.9, alpha = 1)
test <- matrix(data=c(20:60),nrow=7,ncol=7)

corrplot(test,tl.cex=3,title="Overlaps Between methods",
  method="circle",is.corr=FALSE,type="full",
  cl.lim=c(10,100),cl.cex=2,addgrid.col="red",
  addshade="positive",col=col1, diag=FALSE,
  addCoef.col = rgb(0,0,0, alpha = 0.6)
)

dev.off()

在此处输入图像描述

4

1 回答 1

9

问题似乎与您提供的png()withheight=1200width=1200选项有关。尝试将该行更改为:

png(height=1200, width=1200, pointsize=25, file="overlap.png")

出于某种原因,默认值pointsize = 12会以某种方式减少labelsand的字体。title

编辑:要正确查看标题,请将此参数添加到您的corrplot

mar=c(0,0,1,0)

所以整个命令集是:

library(corrplot)
png(height=1200, width=1200, pointsize=25, file="overlap.png")
col1 <-rainbow(100, s = 1, v = 1, start = 0, end = 0.9, alpha = 1)
test <- matrix(data=c(20:60),nrow=7,ncol=7)
corrplot(test,tl.cex=3,title="Overlaps Between methods",
method="circle",is.corr=FALSE,type="full",
cl.lim=c(10,100),cl.cex=2,addgrid.col=
"red",addshade="positive",col=col1, addCoef.col = rgb(0,0,0, alpha =
0.6), mar=c(0,0,1,0), diag= FALSE) 
dev.off()
于 2013-02-07T15:10:09.910 回答