[Scilab-users] Plotlib

Stéphane Mottelet stephane.mottelet at utc.fr
Sat Nov 29 00:43:11 CET 2014


Le 28/11/2014 15:45, Collewet Guylaine a écrit :
>
> Hello,
>
> I would like to plot an image using a colormap with plotlib (pcolor 
> function)
>
> In order to "zoom" on the values between A and B, I use the function 
> caxis([A B])
>
> But I would like also the pixels with values lower than A or greater 
> than B to be colored in white as the background
>
> Is it possible to do that?
>
> Thanks
>
> Guylaine Collewet
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
Hello,

Try this :

colormap([1 1 1;jetcolormap(128);1 1 1])
x=linspace(-1,1,100);
[X,Y]=meshgrid(x,x);
pcolor(cos(%pi*(X.^2+Y.^2)))
shading flat
caxis([0 0.9])

hth

S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20141129/8a8622cd/attachment.htm>


More information about the users mailing list