[Scilab-users] plot(x) - define color
Stéphane Mottelet
stephane.mottelet at utc.fr
Fri Feb 19 10:53:20 CET 2021
Hi,
Since 6.1 version, plot() yields the handles of created polyline
entities, allowing to improve the piece of code which has been proposed,
like this:
colour=["red","blue","chocolate1",...]; // help color_list
for j=1:20
h = plot(TestPH(j,:))
h.foreground=color(colour(j));
end
S.
Le 19/02/2021 à 10:37, Jean-Yves Baudais a écrit :
> 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
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
More information about the users
mailing list