Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: colormap scaling?
Replies: 1   Last Post: Aug 20, 1996 10:22 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michael D Sohn

Posts: 13
Registered: 12/7/04
colormap scaling?
Posted: Aug 9, 1996 12:19 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.