I have a 15-dimensional data set and I would like to view the correlation matrix and the covariance matrix in 1 image. To do this I use the upper half triangle + the diagonal of a 15x15 matrix for the covariance data and the lower half triangle for the correlation data. I would like to apply a heatmap to this matrix, but have the covariance color mapping scale be independent of the correlation color map scale.
exampleData = rand(100,15)*50;
exampleCov = cov(exampleData);
exampleCorr = corrcoef(exampleData);
matrixToPlot = triu(exampleCov) + tril(exampleCorr,-1);
However I would like to be able to have two different scales for the colormap, one which is used for the lower correlation data and a different one for the covariance.
I considered plotting exampleCov and exampleCorr seperately, but this just overwrites the latter onto the former:
This would be easy if I could set 0 values to NaN, and assign NaN color as 'none', but setting NaN color as 'none' is not supported.