Build colormap with custom colors
1 view (last 30 days)
Show older comments
I want to be able to create a simple xy plot, with colors representing the frequency of certain values in my data. My y's will be 1,2,3,4,5... etc. My x's will be a wide array of numbers. I want to be able to show by color how often certain ranges within the x values show up (red for more frequent values, blue for less frequent values). Any help would be greatly appreciated.
Answers (1)
Image Analyst
on 18 Jul 2014
Use scatter() - with that function you can control the color and size of every marker.
1 Comment
Image Analyst
on 18 Jul 2014
No, for that kind of image you need to use image() or imshow() and then apply a colormap, such as
imshow(grayImage, []);
colormap(jet(256));
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!