[scilab-Users] Re : [scilab-Users] grayplot scaling

Stéphane Mottelet stephane.mottelet at utc.fr
Mon Nov 8 09:16:02 CET 2010


The code you posted before works out of the box, with Scilab >=5.2
provided you change "pi" by "%pi" and that you enable the plotlib
macro names without underscores :

plotlibmode // done once for all, to be put in your .scilab user startup 
file

figure,
x = linspace(0,1,101);
z = cos(2*%pi*x)'*sin(2*%pi*x);
zm = min(min(z)); zM = max(max(z));
pcolor(x,x,z), shading flat,
caxis manual; caxis([zm zM]);
colorbar

figure,
z2 = x'*x*0.4;
pcolor(x,x,z2), shading flat,
caxis manual; caxis([zm zM]);
colorbar

S.

On 11/08/10 01:54, Bouchra Bensiali wrote:
> Thank you for the answer, I tried that but finally it seems that there is a
> problem when colorbar is used with grayplot, see
> http://bugzilla.scilab.org/show_bug.cgi?id=4808. Anyway, the link provides a
> solution using Sgrayplot with the zminmax option.
>
> Another solution would be to use the "Matlab-like" Plotting library for Scilab
> http://atoms.scilab.org/toolboxes/plotlib/0.42, but I have some problems to plot
> graphics in scilab-5.2.2. Can I use the plotlib with scilab-4.1.2?
>
> Thank you.
>
>
> ----- Message d'origine ----
> De : Samuel Gougeon<Samuel.Gougeon at univ-lemans.fr>
> À : users at lists.scilab.org
> Envoyé le : Lun 8 novembre 2010, 0h 46min 35s
> Objet : Re: [scilab-Users] grayplot scaling
>
> Hello,
>
> Bouchra Bensiali<bouchra.bensiali at yahoo.fr>  a écrit :
>
>    
>> Hello,
>>
>> Is there an equivalent in Scilab to the Matlab caxis Pseudocolor axis scaling?
>> I
>> want to do something like that:
>>      
> .../...
>    
>> caxis manual; caxis([zm zM]); colorbar
>>      
> I am not a Matlaber, but after watching online Matlab help page
> for caxis(), it comes that these 3 instructions are written as
> something like
>
> colorbar(zm,zM)
>
> in Scilab
>
> Regards
> Samuel
>
>
>
>    




More information about the users mailing list