[英]How can I change the font size of the labels in corrplot's lengend, in R?
I would like to change the size of the 1 to -1 labels in the scale that appears alongside a call to corrplot
, but am unsure what parameter to pass to accomplish this. 我想将1到-1标签的大小更改为对corrplot
的调用旁边出现的比例,但是不确定要传递什么参数来完成此操作。
An example call would look like 一个示例调用看起来像
corrplot(data, method="pie", cex=2)
Some reasonable guesses on my part, which did not work, include: 就我而言,一些不可行的合理猜测包括:
cex=2 (errors/warnings, no effect)
cex.xlab=2 (errors/warnings, no effect)
cex.legend=2 (errors/warnings, no effect)
cex.axis=2 (sets axis labels of main plot 2x size, no effect on legend text)
I think you're looking for tl.cex: 我认为您正在寻找tl.cex:
df <- data.frame(x = rnorm(10), y = rnorm(10), z = rnorm(10))
library(corrplot)
z <- corrplot(cor(df), method = "pie", tl.cex=4)
It looks like many of the options in corrplot()
are set with tl*, eg, tl.col for color, etc. 看来corrplot()
中的许多选项都是用tl *设置的,例如tl.col表示颜色等。
Following on @ulfelder's answer, the parameters for controlling the scale are given by cl.x, rather than tl.x. 按照@ulfelder的答案,用于控制音阶的参数由cl.x而不是tl.x给出。
cl.cex = 2 does exactly what is needed. cl.cex = 2完全满足需要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.