How to assign the value to the min/max of a color map in heatmap?
13 ビュー (過去 30 日間)
古いコメントを表示
Zeynab Mousavikhamene
2020 年 4 月 7 日
回答済み: sogol bandekian
2022 年 5 月 21 日
I need zero to be yellow and 1 to be green but it is opposite in the heatmap now:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282439/image.jpeg)
Any idea to reverse this?
0 件のコメント
採用された回答
Mohammad Sami
2020 年 4 月 7 日
You can flip the colormap summer to get your desired colorscheme.
f = figure;
a = heatmap(rand(10,10),'Parent',f);
colormap(f,flipud(summer));
0 件のコメント
その他の回答 (3 件)
Domenico Lucia
2021 年 1 月 7 日
Hi, i need something similar. I used HeatMap function ad i obtained the two charts in attachment. The max values for the two charts are 1 an 0.857. On the two charts the maxi values (1 and 0.857) have the same color green. I need to rescale the second chart to the maximum value 1 in order to obtain the same colours for the same values in the two charts.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481208/image.png)
sogol bandekian
2022 年 5 月 21 日
I have same question,How can I show the max and min of bi-variate function with colormap?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!