Correlation plot with double legends

147 views Asked by At

So I want to build a correlation plot for an N*N matrix. But, the difference is that I want the upper-triangular and the lower-triangular to have different colors. Because the upper-triangular matrix will represent Z-squared values and the lower-triangular, D prime. Of course, the diagonal should be white to denote the equalities.

How can this be done with R? I checked corrplot and other alternatives in Google but I can't figure it out. Can this be done?

An example matrix for Z-scores could be a matrix like so:

    SNP1 SNP2 SNP3 SNP4 ... 
SNP1 1 0.0007 0.05 0.004 ...
SNP2 0.003 1 0.00001 0.02 0.000003 ...

Same applies to D-prime matrixes. I just want to plot them with different colors in the same correlation matrix.

0

There are 0 answers