scatterm with scatter marker pink to red color based on values
6 ビュー (過去 30 日間)
古いコメントを表示
Hello,
Based on another post I have been able to find how create a scatter map with marker size and color based on the data value, but I would like to change the colors to range from light pink to dark red so lump the lower values into pink medium into red and large values into dark red. I have not been able to figure out how to do this. I would appreciate any help, thank you.
This is what I have so far where the colors range from blue to red.
scatterm(lat20,lon20,z20*10,z20,'filled')
回答 (1 件)
Chad Greene
2016 年 7 月 31 日
You're close. The scatter and scatterm functions link colors to the current colormap of the figure. So you'll have to set the colormap. Using my rgb function it's pretty straightforward:
scatter(rand(100,1),rand(100,1),50,rand(100,1),'filled');
colormap(rgb('light pink','medium pink','dark red'))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で White についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!