[Scilab-users] xsegs() <= Re: interp_color_vector

Samuel Gougeon sgougeon at free.fr
Tue Jun 9 14:44:52 CEST 2015


Le 08/06/2015 18:56, Adelson Oliveira a écrit :
> Thanks for the answer,
>
> I intend to plot a curve that changes its color. Following your code 
> I've tried,
.
Here is an example with a 1D curve laying in the 2D plane, using xsegs():

f  =  gcf();
f.color_map  =  jetcolormap(100);  
// with Scilab 6, gcf().colormap = jetcolormap(100); // will work. Cool :)

clf
x  =  linspace(0,10,101);
y  =  sin(x);
xs  =  [  x(1:$-1)  ;  x(2:$)];  
ys  =  [  y(1:$-1)  ;  y(2:$)];  
xsegs(xs,ys,1:100)
e  =  gce();
e.thickness  =  5;




You may customize it.

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150609/bbe167bb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ajeahfbc.png
Type: image/png
Size: 2606 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20150609/bbe167bb/attachment.png>


More information about the users mailing list