[Scilab-users] Polyline markers cycling through selected colors

Jens Simon Strom j.s.strom at hslmg.de
Wed Feb 12 16:19:25 CET 2020


Hallo Scilab experts,

The script below should color the markers in a cyclic manner. It does - 
however only temporary! What should be changed? I would like to keep the 
plot command off the loop.

Kind regards

Jens

xdel()
x=1:15;
y=x;
COLO=[5  3  2  1]//selction of color IDs
ncol=length(COLO);     
   plot(%nan,%nan)//initialize axes
   ca=gca();//get handle
   for  i=1:15
   colo=modulo(i+ncol-1,ncol)+1;//i mapped to cyclic indices
   ca.children.children.data=[x(i),y(i)];
   ca.children.children.mark_mode  =  "on";
   ca.children.children.mark_style  =  4;
   ca.children.children.mark_size  =  25;
   ca.children.children.mark_foreground  =  COLO(colo);
   //set(ca,"auto_clear","off");
   sleep(500)
end //End of Skript

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200212/4b978f7b/attachment.htm>


More information about the users mailing list