First, you might want to see example "text_14.ncl" on the text examples page, which was created by Mateus da Silva Teixeira to generate special symbols like the umlaut:
http://www.ncl.ucar.edu/Applications/text.shtml
Creating these kind of characters is not very straightforward to do with NCL, but you can attempt this with the "Hx" and "Vx" function codes. These stand for "horizontal move" and "vertical move".
Here's a sample script:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
wks = gsn_open_wks("x11","text")
;---Create a blank plot that we can draw on.
res = True
blank_plot = gsn_blank_plot(wks,res)
txres = True
;---This attaches a "u" with a bar under it
str = "_~H-15~u"
txid1 = gsn_add_text(wks,blank_plot,str,0.5,0.5,txres)
;---This attaches a "u" with a bar over it
str = "_~H-16~~V-21~u"
txid2 = gsn_add_text(wks,blank_plot,str,0.5,0.7,txres)
draw(blank_plot)
frame(wks)
end
On Oct 27, 2011, at 11:59 AM, Walter Hannah wrote:
> I'd like to be able to add an overbar to a string, such as u'q', when
> I'm plotting terms from a budget analysis.
> I did some searching but couldnt find anything on whether a text
> function code exists for this. Is there some way to make this happen?
>
> Thanks,
> Walter
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 27 15:16:43 2011
This archive was generated by hypermail 2.1.8 : Fri Oct 28 2011 - 10:52:03 MDT