Re: string color function code

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 21 Apr 2009 10:57:14 -0600 (MDT)


It is not trivial to change the color of a string in mid-string,

I've never understood this, because you can change the font itself in
mid-string, using function code "F":

res_at_tiMainString = "This~F15~is gothic english ~F26~ and this is times-bold"

It seems that a color change could be done similarly.

As it is, I think you would have to draw the strings individually in
the color that you want. This is somewhat of a pain, for example, if
you want to draw a main title in different colors. You wouldn't
be able to use "tiMainString"; rather, you would have to use
gsn_text_ndc to draw the different strings individually.

I'll see if this is something we can add to the list.


On Tue, 21 Apr 2009, Jamie Scott wrote:

> A nice solution would be to have a string color function code, so you
> could change the color of individual strings or parts of strings.
> -Jamie
> On Apr 21, 2009, at 10:27 AM, wrote:
>> Unfortunately there's no way to do this with the current version.
>> I've added gsnLeftStringFontColor to the attached gsn_csm.mods.ncl
>> script. You can try loading this script after you load "gsn_csm.ncl",
>> and hopefully it should allow you to set resources:
>> gsnStringFontColor
>> gsnRightStringFontColor
>> gsnCenterStringFontColor
>> gsnLeftStringFontColor
>> to either integers or named colors ("red").
>> --Mary
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Apr 21 2009 - 10:57:14 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 21 2009 - 11:04:41 MDT