[Scilab-users] {EXT} Curves color when plotting

Samuel Gougeon sgougeon at free.fr
Mon Oct 28 13:36:16 CET 2019


Hello,

Le 22/10/2019 à 09:02, Perrichon a écrit :
>
> Hello,
>
> Thanks you for your response
>
> I mainly plot curves for bode, nyquist plans, et also time response 
> curves  with csim.
>
> With csim, curves are plotted using plot2d. So the problem is very 
> easy to solve :
>
> simulation=csim(in, t, SYS_FTBF );
>
> plot2d(t' , [in' 
> simulation'],rect=[0,ymin_Temp,tmax,ymax_Temp],style=TColor);
>
> where TColor=[2 3 5 4 6 16 5 15];
>
> I suppose that 2, 3 …are index in a Color Table by default.
>
> I have no solution to colorize curves with bode or nyquist, exept to 
> acces to children(xx).foreground=TColot(i)
>
> where i is the curve number.
>
> That's what I wanted to avoid
>
There is no need to use an external loop on i:

// After the bode() 's first example:
curves = gcf().children.children.children;
curves.foreground = color("orange");
curves.thickness = 2;

// After the second bode()'s example :

curves = gcf().children.children.children
o = color("orange"); g = color("green");
curves.foreground = [o g o g];
curves.thickness = 2;


*Using handles on curves looks more powerful than adding a style option 
to bode().**
***Handles enable tuning all the properties of curves, including their 
thicknesses, etc,
what would require several separate bode's options.
Also, handles allow to set properties of any subset of selected curves, 
while in options
a special value would be required to tell "do not change the value for 
this curve".

However, after calling bode(), we could expect that gce() returns
curves = gcf().children.children.children
while presently bode() does not set gce() at all.
This wish would deserve a post in bugzilla.

*For the Nyquist plot*: presently, addressing graphical elements is more 
complex.

Regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191028/f6fb48c6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aemkaikfhdocecgn.png
Type: image/png
Size: 9107 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20191028/f6fb48c6/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecnialkipehoipdd.png
Type: image/png
Size: 10299 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20191028/f6fb48c6/attachment-0001.png>


More information about the users mailing list