Build colormap with custom colors

1 view (last 30 days)
Renee Arias
Renee Arias on 17 Jul 2014
Commented: Image Analyst on 18 Jul 2014
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.
  1 Comment
Renee Arias
Renee Arias on 18 Jul 2014
Edited: Renee Arias on 18 Jul 2014
I really would like to generate a figure like this. Is that still possible with scatter() ?

Sign in to comment.

Answers (1)

Image Analyst
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
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));

Sign in to comment.

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!