how to show significant and insignificant coeficients in a corrplot when use insig equall 'blank"?

177 Views Asked by At

I'm using this code:

corrplot(v_cor, 
     method="color", 
     col = c('#bf9000ff','#f1c232ff','#ffe599ff','#fff2ccff','#c9daf8ff','#a4c2f4ff','#3c78d8ff','#21437aff'),  
     type="lower", order="original", 
     addCoef.col = "black", # Add coefficient of correlation
     tl.col="black", tl.srt=45, #Text label color and rotation
     # Combine with significance
     p.mat = p_val, sig.level = 0.1, insig = "blank",
     # hide correlation coefficient on the principal diagonal
     diag=FALSE )

I have this result: 1st result

But I want to show the insignificant coefficients but the box must be blank. e.g.

desired result

UPDATE: I was able to solve this problem and added one more line.

    corrplot(v_cor, 
     method="color", 
     col = c('#bf9000ff','#f1c232ff','#ffe599ff','#fff2ccff','#c9daf8ff','#a4c2f4ff','#3c78d8ff','#21437aff'),  
     type="lower", order="original", 
     addCoef.col = "black", # Add coefficient of correlation
     tl.col="black", tl.srt=45, #Text label color and rotation
     # Combine with significance
     p.mat = p_val, sig.level = 0.1, insig = "blank",
     # hide correlation coefficient on the principal diagonal
     diag=FALSE ) -> p1                                      
      text(p1$x, p1$y,round(p1$corr, 2) ,cex= 0.8, font = 2)
0

There are 0 best solutions below