load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ; ; The poly1* series of examples shows how to add various annotations ; to a plot, like markers, text, polygons, and lines. There are ; two different data spaces you can use for adding this stuff: NDC ; space, or data space. Both will be shown. ; begin wks = gsn_open_wks("ps","poly1d") ; Open PS file "poly1d.ps" mpres = True ; Variable for map resources. mpres@gsnDraw = False ; Don't draw plot yet mpres@gsnFrame = False ; Don't advance the frame mpres@mpMinLatF = 25. ; Zoom in on United States mpres@mpMaxLatF = 50. mpres@mpMinLonF = 235. mpres@mpMaxLonF = 290. mpres@mpLandFillColor = 11 ; Yellowish mpres@tiMainString = "Ugly map" ; Main title map = gsn_csm_map(wks,mpres) ; Create plot, but don't draw it. ; ; Add a marker to the plot, using the lat/lon data space of the map. ; gsres = True ; "Graphic Style" resources gsres@gsMarkerColor = "NavyBlue" ; Marker color gsres@gsMarkerIndex = 15 ; Marker style gsres@gsMarkerSizeF = 30.0 ; Marker size gsres@gsMarkerThicknessF = 3.0 ; Marker thickness dum = gsn_add_polymarker(wks,map,-110,40,gsres) draw(map) ; Drawing map will draw "added" features. frame(wks) ; Advance frame end