[Scilab-users] plot(x) - define color

Jean-Yves Baudais Jean-Yves.Baudais at insa-rennes.fr
Fri Feb 19 10:37:17 CET 2021


Hi,


> colour=['.r-','.g-','.k-','.b-','.m-','.r:','.g:','.k:','.b:','.m:','.r--','.g--','.k--','.b--','.m--','.r-.','.g-.','.k-.','.b-.','.m-.'];
> for j=1:20
>    plot(TestPH(j,:),colour(j));
> end
> 
> but the plot is not very clear. I would like to add different color and to
> reduce line styles, that are difficult to recognize in the plot.


I don't if there is a dedicated function, but 

colour=["red","blue","chocolate1",...]; // help color_list
for j=1:20
  plot(TestPH(j,:))
  gcf().children.children.children(1).foreground=color(colour(j));
end

gives a solution.

--Jean-Yves



More information about the users mailing list