MATLAB: Could I set the colorbar resolution?

pcolor; colorbar

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?

Best Answer

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.