[scilab-Users] color of a string

grivet grivet at cnrs-orleans.fr
Thu Apr 5 12:15:04 CEST 2012


Le 03/04/2012 19:27, Adrien Vogt-Schilb a écrit :
> On 03/04/2012 17:47, grivet wrote:
>> Hello,
>> How can I change the color of a string using Scilab5.3.2?
>> For instance, I wish to plot two vectors using 
>> plot2d(u,[a,b],style=[2,14]) and then write a
>> label next to each curve with xstring(xa,ya,string_a), 
>> xstring(xb,yb,string_b); this works.
>> Now, I would like to match the color of the text to that of the 
>> curves. I tried xset("color",2)
>> and xset("color",14); this changes the color of the axes (in an 
>> unpredictable manner) but not
>> that of the text.
>> Thanks for your help
>>
>>
> Hi
>
> Build on this:
>
> plot()
> xstring(1,0,"ET PAF!")
> e=gce()
> e.font_foreground = 3
>
> or if you are familiar with RGB 
> <http://en.wikipedia.org/wiki/RGB_color_model>:
>
> e.font_foreground = color(255,100,100)
>
> br
> avs
Thank you Adrien, this works fine; is there a way to change the color of 
several strings at the same time
instead of repeating the sequence xstring(), e = gce(),e.font_foreground 
= n for each ?
JP Grivet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120405/a127be5d/attachment.htm>


More information about the users mailing list