I am trying to recreate someone's image using corrplot. This is the original image I am trying to re-create:
I use the following R-code:
corrplot(as.matrix(rgs),
method="circle",
type="upper",
col=brewer.pal(n=8, name="PuOr"),
tl.col="black",
tl.srt=45,
p.mat = as.matrix(pvalues),
sig.level = 0.05,
insig = "blank")
Which gives me this:
The problem I have is that the colour as well as the size of the circles in my plot are based on the correlations, but in the original image above the colour of the circles is based on the correlation while the size of the circles is based on the p-values. I have the p-values in a different data frame called pvalues (I actually use that in the code above to determine which circles should be shown and which shouldn't in the bottom 3 lines). My question is: how can I make the colour and size be dependent on two different variables like they did in the original image? Is that even possible using corrplot?





