[scilab-Users] 2D surface plot : color scale adjustments

Stéphane Mottelet stephane.mottelet at utc.fr
Wed May 25 16:40:58 CEST 2011


Le 25/05/2011 22:27, CHEZE David 227480 a écrit :
>
> hi,
>
> i would like to force the upper and lower bounds of color scale in a 
> surface plot (not automatic min/max adjustment): for quick visual 
> comparison between multiple plots, with the same reference but min max 
> value that can vary over a wide range of values. Is it possible to do 
> it through a dedicated functions rather than by inserting artificial 
> min max values in the data that i want to plot ?
>
> for example I have an array A  of value ranging from 0 to 10 and and 
> another from 0 to 1000 : if I plot this 2 sets of values in 2 
> different plots, color related to 10 in A-plot and related to 1000 in 
> B-plot is the same for a given colormap.  I would like to force the 
> colormap 'scale' of B-plot to these of A-plot.
>
> Thanks for your help,
>
> David
>
Hello,

what you want to do is very easy with the plotlib, here is an example :

A=2*rand(10,10);
B=rand(10,10);
subplot(2,1,1);
pcolor(A);
caxis([0,2]);
colorbar;

subplot(2,1,2)
pcolor(B);
caxis([0,2]);
colorbar;

To install the plotlib :

atomsInstall('plotlib');

S.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110525/4cd3c212/attachment.htm>


More information about the users mailing list