[Scilab-users] ?==?utf-8?q? Same color for contour isolines

Jens Simon Strom j.s.strom at hslmg.de
Fri Mar 17 15:28:14 CET 2017


Hi Antoine,
Brillant! My search did not reach out that far. I only fiddled around 
with the parents children and grand...grandchildren stuff.
BTW: Is " Look ma'  " the felt German for /Guck mal/?
Kind regards
Helmut
----------------------------------------------
Am 17.03.2017 14:01, schrieb Antoine Monmayrant:
> Le Jeudi, Mars 16, 2017 11:32 CET, Jens Simon Strom <j.s.strom at hslmg.de> a écrit:
>   
>> Hi,
>> How would you avoid the loop in the following example?
> By setting the colormap beforehand so that is only contains the color you want:
>
> n2_=-1000:200:1000;
> nS_=-1000:200:1000;
> [N2,NS]=ndgrid(n2_,nS_);
> N1=2.6*N2+(3.6)*NS;
> xdel();
>
> levels=[-60:10:60];
> h=scf();
> h.color_map=(ones(levels)).'*[0,1, 0];// replace the green [0,1, 0]; by any rgb color you want
> contour(n2_,nS_,N1/100,levels);
>
> It's a workaround, it's ugly, but it does the job: "Look ma', no loop!".
>
> Hope it helps,
>
> Antoine
>
>
>> n2_=-1000:200:1000;
>> nS_=-1000:200:1000;
>> [N2,NS]=ndgrid(n2_,nS_);
>> N1=2.6*N2+(3.6)*NS;
>> xdel();
>> contour(n2_,nS_,N1/100,[-60:10:60])
>>
>> ca=gca();  Comp=ca.children;  //colum matrix of handles: (Compound)
>> nComp=length(Comp);
>> for  k=1:nComp
>>    Comp(k).children.foreground=3;
>> end
>>
>> Regards
>> Jens
>>
>>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170317/00f975e2/attachment.htm>


More information about the users mailing list