I have added an example of the code I am using and the output I am getting. In reality I am using a big dataset.
I am using the library corrplot to produce the plot.
I would like that for the P-Values given in the lower triangle that the numbers are a certain colour according to their value. For example P-Values in the range <0.001 to be "red" 0.01 - 0.001 "orange" 0.05 - 0.01 "yellow" and values over 0.05 to have no colour.
library(Hmisc)
library(corrplot)
cor_5 <- rcorr(as.matrix(Orange))
cor_5$r[lower.tri(cor_5$r)] = cor_5$P[lower.tri(cor_5$P)]
cor_5$P[lower.tri(cor_5$P)] = 0
M <- cor_5$r
p_mat <- cor_5$P
corrplot.mixed(M, upper = 'color', lower = 'number', p.mat = p_mat, sig.level = 1.6, insig = 'blank',
tl.pos = 'd', lower.col = "black", tl.col = "black")