TMS TMS - 3 months ago 288
R Question

How to change font size of the correlation coefficient in corrplot?

I am plotting correlation plot with corrplot. I want to plot also the correlation coefficients:

require(corrplot)
test <- matrix(data = rnorm(400), nrow=20, ncol=20)
corrplot(cor(test), method = "color", addCoef.col="grey", order = "AOE")


But they are too big in the plot:

enter image description here

Is there any way to make the font of the coefficent smaller? I've been looking at
?corrplot
but there are only parameters to change the legend and axis font sizes (
cl.cex
and
tl.cex
).
pch.cex
doesn't work either.

TMS TMS
Answer

It is far from the answer, it is kind of a dirty hack, but this works (thanks user20650 for the idea):

cex.before <- par("cex")
par(cex = 0.7)
corrplot(cor(envV), p.mat = cor1[[1]], insig = "blank", method = "color",
    addCoef.col="grey", 
    order = "AOE", tl.cex = 1/par("cex"),
    cl.cex = 1/par("cex"), addCoefasPercent = TRUE)
par(cex = cex.before)