Heatmap colors in districts of a map

1 回表示 (過去 30 日間)
francisco Sequeira
francisco Sequeira 2020 年 5 月 10 日
編集済み: Amrtanshu Raj 2021 年 2 月 5 日
Hey everybody,
I have this code for a heatmap. Currently, the colors are totally random, and i want a specific color, associated with the number of COVID cases. to be in a specfic district. No idea how to do this, I've tried to search for ways to do it but i think I'm using the wrong keywords. If anybody could explain to me how to do this, it would be grand.
Best regards,
Fran

回答 (1 件)

Amrtanshu Raj
Amrtanshu Raj 2021 年 2 月 5 日
編集済み: Amrtanshu Raj 2021 年 2 月 5 日
Hi,
The colormap can be used to change the colors in the plots. The colors are not random but taken from a set scheme as you can check in the documentation. You can also give a custom colormap as per your requirement.
Just update the colormap in this line (line 43) of your code.
colormap( OverlayImage.Parent, jet );
Hope this helps !!

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by