Could I set the colorbar resolution?

15 views (last 30 days)
when I plot a large picture using the PCOLOR function, there are many values in one color what makes my pic look like a contour map.
could I set the colorbar resolution to make my picture more smooth?

Accepted Answer

Image Analyst
Image Analyst on 31 Jan 2015
Give a number close to 256, but not more, to your colormap
image(yourImage); % I would not use pcolor in most situations.
colorMap = jet(256);
colormap(colorMap); % Apply the colormap
colorbar; % Show a colorbar "legend"
Any reason why you're using pcolor? Maybe you don't want the last row and column of your image displayed for some strange reason??? Try imshow() or image() instead.

More Answers (0)

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!