; ; Note: This example will not run with Version 4.1 or earlier of NCL. ; If you are licensed for version 4.1 of NCAR Graphics and are ; interested in getting a *test* version of NCL that will work with ; this example, send email to ncargfx@ucar.edu. ; ; This example makes use of the GSUN functions and procedures for ; generating graphics. If you would like more information on GSUN, ; go to the URL: http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/ ; load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl" ; Load the NCL file ; that contains the gsn_* ; functions used below. begin wks = gsn_open_wks("x11","example1") ; Open an X11 window. textres = True ; Variable to hold text resources. ; ; In the lines below, "txFontColor" is the resource for changing the ; font color of a text string, "gsn_text_ndc" draws a text string ; in NDC space, and ":F26:" in the text string is a special function code ; that changes the font to times-bold. ; textres@txFontColor = "red" gsn_text_ndc(wks,":F26:Red String",0.5,0.2,textres) textres@txFontColor = "green" gsn_text_ndc(wks,":F26:Green String",0.5,0.4,textres) textres@txFontColor = "blue" gsn_text_ndc(wks,":F26:Blue String",0.5,0.6,textres) textres@txFontColor = "Yellow" gsn_text_ndc(wks,":F26:Yellow String",0.5,0.8,textres) frame(wks) ; Advance the frame. end