[Scilab-users] TR: {EXT} Curves color when plotting
Chin Luh Tan
chinluh.tan at bytecode-asia.com
Wed Oct 23 14:32:27 CEST 2019
very nice chart, great you find your way.
rgds,
CL
---- On Wed, 23 Oct 2019 18:44:40 +0800 Perrichon <perrichon.pierre at wanadoo.fr> wrote ----
Hello CL
Thanks you for your response. It’s wise en relevant.
But yesterday, I’ve found 5 minutes ti program the children(x).foreground
Also thanks you for this nice conversation and exchange
Pierre P.
De : users <mailto:users-bounces at lists.scilab.org> De la part de Chin Luh Tan
Envoyé : mercredi 23 octobre 2019 02:02
À : Users mailing list for Scilab <mailto:users at lists.scilab.org>
Objet : Re: [Scilab-users] {EXT} Curves color when plotting
Hi,
I see. In his case, since Scilab is open source, I think the best way is to edit the plot to suit to your need.
for example, you can edit the bode function, add extra line to line 125 and 155
// Set datatips info
124 e = gce();
125 e.children.foreground = tcolor(1); <-- extra line
126 for i=1:size(e.children, "*")
154 ephi = gce();
155 ephi.children.foreground = tcolor(2) <-- extra line
// Set datatips info
for i=1:size(ephi.children, "*")
and the header
bode(tcolor, varargin)
so you can call the bode by:
bode([2,5],h, 0.01, 100);
and get
then you goto the SCI\modules\cacsd\macros\ , run buildmacros.sce to make it permanent.
CL
---- On Tue, 22 Oct 2019 15:02:55 +0800 Perrichon <mailto:perrichon.pierre at wanadoo.fr> wrote ----
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
Best regards
_______________________________________________
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/20191023/092d0045/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.jpg
Type: image/jpeg
Size: 15577 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20191023/092d0045/attachment.jpg>
More information about the users
mailing list