[Scilab-users] Plotting curves against a set of points

Samuel Gougeon sgougeon at free.fr
Tue Dec 22 23:03:40 CET 2015


Hello,

Le 22/12/2015 11:37, Alasdair McAndrew a écrit :
> Hello,
>
> I'm experimenting with fitting an ODE model (a non-linear system) to 
> some data; what I want to do is to plot the curves representing the 
> ODE numerical solutions against the initial (discrete) data points.  
> And I want to be able to specify the thickness and color of the 
> curves, as well as providing a legend to it.
>
> I can do the curves by carefully using gca, gce etc, and copying and 
> pasting examples from the documentation, but I don't yet know how to 
> plot the data points.
>
> For example, I have a time vector containing about 150 points, and an 
> array containing all the corresponding ODE values; thus:
>
> plot2d(t,x',style=[color("red"),color("green"),color("blue")]);
>
> However, I don't know how to include in this plot the 14 or 15 data 
> points.
.
//After
plot2d(t, x', style = color(colorname))

// Do something like
plot2d(xdp, ydp);
c = gce();
c = c.children;
c.line_mode = "off";
c.mark_mode = "on";
c.mark_size_unit = "point";
c.mark_size = 4;
help polyline_properties // 
https://help.scilab.org/docs/5.5.2/en_US/polyline_properties.html

HTH
Regards
Samuel Gougeon



More information about the users mailing list