Heatmap with specified color ranges?

I would like to generate a heat map for my data such that values =<3.00 are white, and values >3.00 up to the max (typically the max values can be from 10.00 to 30.00) are graded from white to red. For example, in Excel, the conditional formatting rule is:
How do I do the eqjuivalent for my matrix of data, using Matlab's heatmapping?
Thanks!

 採用された回答

dpb
dpb 2020 年 7 月 1 日

0 投票

Whether this does precisely what you're looking for or not, I dunno...but might be a starting point.
Nothing like that built in to any of the MATLAB colormap functionality.

3 件のコメント

Stephen
Stephen 2020 年 7 月 1 日
OK, thanks! Let me play with this and see how it works...
Stephen
Stephen 2020 年 7 月 1 日
Wait! I just think I solved my own problem with a SIMPLE solution. Namely, if I set the color axis to a threshold value, e.g. 3, and select a max value that will include the peak values in my array, this does the same thing as the above Excel conditioning format! That is:
caxis([3 10]);
dpb
dpb 2020 年 7 月 1 日
Kewl. I never did follow the caxis stuff all that much...

サインインしてコメントする。

その他の回答 (0 件)

製品

質問済み:

2020 年 7 月 1 日

コメント済み:

dpb
2020 年 7 月 1 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by