Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



colormap scaling?
Posted:
Aug 9, 1996 12:19 PM


I'm using Matlab 4.2c for a HP workstation. I have some x,y,z data that I want to plot as a pcolor map. I successfully do this by typing:
>axes('position',[.1 .1 .8 .8]) >pcolor(X,Y,Z);
where the X,Y,Z matrixes are in the proper form. I then select the hsv colormap with a specified number for levels:
>colormap(hsv(50));
I then insert a bar specifying the color scale:
>axes('position',[.1 .1 .03 .8]) >pcolor([1:50;1:50]')
Here are my questions:
1) how do I include the value of the data that the color represents on the bar?
2) I want to change the minimum and maximum color values:
> caxis([2,8])
I thought that the values beyond these limits in the Z matrix should not be plotted. Instead, the colormap changes and all of the data are still plotted. What am I doing wrong? This is important to me because I want to plot many figures with the same color scale.
thanks
Mike



