我使用了如下的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()
最佳答案
问题似乎出在 png()
以及您提供的 height=1200
和 width=1200
选项上。尝试将该行更改为:
png(height=1200, width=1200, pointsize=25, file="overlap.png")
出于某种原因,默认的pointsize = 12
会以某种方式减少标签
和标题
的字体。
编辑:要正确查看标题,请将此参数添加到您的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()
关于r - R 中的 corrplot 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14753344/