<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.tlid-translation
{mso-style-name:tlid-translation;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Thanks you for your response<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I mainly plot curves for bode, nyquist plans, et also time response curves with csim.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>With csim, curves are plotted using plot2d. So the problem is very easy to solve :<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'> simulation=csim(in, t, SYS_FTBF );<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'> plot2d(t' , [in' simulation'],rect=[0,ymin_Temp,tmax,ymax_Temp],style=TColor);<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>where TColor=[2 3 5 4 6 16 5 15];<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I suppose that 2, 3 …are index in a Color Table by default. <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I have no solution to colorize curves with bode or nyquist, exept to acces to children(xx).foreground=TColot(i)<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>where i is the curve number.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span class=tlid-translation><span lang=EN>That's what I wanted to avoid</span></span><span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Best regards<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Pierre P.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b>De :</b> users <users-bounces@lists.scilab.org> <b>De la part de</b> Chin Luh Tan<br><b>Envoyé :</b> mardi 22 octobre 2019 04:48<br><b>À :</b> Users mailing list for Scilab <users@lists.scilab.org><br><b>Cc :</b> Users mailing list for Scilab <users@lists.scilab.org><br><b>Objet :</b> Re: [Scilab-users] {EXT} Curves color when plotting<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Hi,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>from my understanding, easiest way to get the color you wanted is by specifying it during the plot function. <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>--> plot(x,sin(x),'b')<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>--> plot(x,cos(x),'b')<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>will gives u 2 blue lines.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>By default, scilab figure will following the sequence as stated in "help plot"<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>"A default color table is used to color plotted curves if you do not specify a color. When drawing multiple lines, the plot command automatically cycles through this table. Here are the used colors:"<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>R G B<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0. 0. 1.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0. 0.5 0.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>1. 0. 0.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0. 0.75 0.75<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0.75 0. 0.75<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0.75 0.75 0.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>0.25 0.25 0.25<o:p></o:p></span></p></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>no matter what colormap you are changing to before the plot, the plot w/o color input will search for the "blue" in the newly define colormap as well. <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>If the previous methods does not work for you, you could plot the graph, find the handle for the line, and change it according to the color index in the colormap for the figure.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>plot(x,sin(x),x,cos(x))<o:p></o:p></span></p></div></div><div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>f = gcf();<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>f.children.children.children.foreground<o:p></o:p></span></p></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>f.children.children.children.foreground(1) = 2;<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>this will change the second line to blue, as the default colormap f.colormap define blue in the second row. (f.color_map)<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>hope this helps.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>rgds,<br>CL<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><div id="Zm-_Id_-Sgn1"><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>---- On Mon, 21 Oct 2019 18:41:09 +0800 <b>Dang Ngoc Chan, Christophe <<a href="mailto:Christophe.Dang@sidel.com" target="_blank">Christophe.Dang@sidel.com</a>></b> wrote ----<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 5.0pt;margin-left:3.75pt;margin-right:0cm'><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Hello Pierre, <br><br>> De : Perrichon <br>> Envoyé : lundi 21 octobre 2019 12:05 <br>> <br>> Generally, when plotting, curves's color are taken in the range color <br>> [1 3 5 7 9 11 13 15 [...] Is there a general way to modify this vector <br>> as to get another one with blue as first curve. <br><br>You might consider redefining the colour map: <br><br><a href="https://help.scilab.org/docs/6.0.2/en_US/colormap.html" target="_blank">https://help.scilab.org/docs/6.0.2/en_US/colormap.html</a> <br><br>Hope this helps, <br><br>regards <br><br>-- <br>Christophe Dang Ngoc Chan <br>Mechanical calculation engineer <br><br>General <br>This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. <br>_______________________________________________ <br>users mailing list <br><a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a> <br><a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a> <o:p></o:p></span></p></div></blockquote></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>