How can I specify different colors for different groups of data in correlation heatmap?
Show older comments
Hello,
I have a correlation heatmap and I would like all the "boxes" with -0.7<R<0.7 to be the same color (e.g. gray), so to be able to more easily visualize the others.
To do this for only one range (e.g. R<0.7), I used caxis, but it does not allow to specify multiple ranges.
This looks like it would be an easy fix, but I am pretty new to Matlab and I don't seem to be able to figure out anything.
Thanks for your input!
Rosalba
3 Comments
darova
on 15 May 2020
Maybe you are looking for this
ix = x.^2 + y.^2 < 0.7^2; % find indices inside radius
A(ix) = 0.5; % assign 0.5 value inside
imagesc(A)
Rosalba Gaudiuso
on 15 May 2020
darova
on 15 May 2020
ok
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!