scatterm with scatter marker pink to red color based on values
7 views (last 30 days)
Show older comments
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')
Answers (1)
Chad Greene
on 31 Jul 2016
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 Comments
See Also
Categories
Find more on White in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!