;************************************************* ; NCL Graphics: text_6.ncl ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; read in netCDF file ;************************************************ a = addfile("uv300.nc","r") u = a->U(0,:,8) ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps","text") res = True ; plot mods desired res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet plot=gsn_csm_xy(wks,u&lat,u,res) ; create xy plot ;************************************************ ; add text to plot ;************************************************ txres = True ; text mods desired txres@txFontHeightF = 0.03 ; font smaller. default big dblquote = integertochar(34) ; convert " in ascii to character title = dblquote + "This is a title with double quotes" + dblquote gsn_text(wks,plot,title,10,9,txres) draw(plot) ; now draw plot frame(wks) ; now advance frame end