load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin npts = 500 ; number of points ncurves = 4 ; number of curves ym = asciiread("xy2.txt",(/npts,ncurves/),"float") x = fspan(-50,50,npts) ; npts values from -50 to 50 y = ym(:,0) ; Just grab one set of points. wks = gsn_open_wks ("x11","poly_ex04") res = True ; Plot options desired. res@gsnMaximize = True ; Maximize plot in frame. res@gsnDraw = False ; Don't draw plot. res@gsnFrame = False ; Don't advance frame. res@trXMinF = min(x) ; Put limits on X axis. res@trXMaxF = max(x) plot = gsn_csm_xy (wks,x,y,res) ; Just create plot, don't draw it. ;---Create three new markers from the "weather2" font table. m1 = NhlNewMarker(wks, "f", 37, 0., 0., 1., 1., 0.) m2 = NhlNewMarker(wks, "l", 37, 0., 0., 1., 1., 0.) m3 = NhlNewMarker(wks, "p", 37, 0., 0., 1., 1., 0.) mkres = True ; Marker options desired ;--- Set resources unique to first set of markers. mkres@gsMarkerIndex = m1 mkres@gsMarkerColor = "Blue" mkres@gsMarkerSizeF = 0.03 ; Make 3 times larger ;---Add some markers. dum1 = gsn_add_polymarker(wks,plot,(/-40,-20,0/),(/500,-200,-350/),mkres) ;---Set resources unique to second set of markers. mkres@gsMarkerIndex = m2 mkres@gsMarkerColor = "Red" mkres@gsMarkerSizeF = 0.02 ; Make 2 times larger ;---Add some markers. dum2 = gsn_add_polymarker(wks,plot,(/20,0,40/),(/480,550,-300/),mkres) ;---Set resources unique to third set of markers. mkres@gsMarkerIndex = m3 mkres@gsMarkerColor = "ForestGreen" mkres@gsMarkerSizeF = 0.04 ; 4 times as large ;---Add some markers. dum3 = gsn_add_polymarker(wks,plot,1,-200,mkres) draw(plot) ; Markers won't show up until you draw plot. frame(wks) ; Advance the frame. end