;---------------------------------------------------------------------- ; This is a basic NCL template for creating XY plots. ;---------------------------------------------------------------------- load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;---Read data a = addfile("file.nc","r") x = a->x y = a->y ;---Open workstation and change color map wks = gsn_open_wks("x11","xy") ; "ps", "pdf", "png" ;---Set some resources res = True res@gsnMaximize = True ; maximize plot in frame ;---These are sample resources you might want to set. res@xyLineColor = "blue" ; use xyLineColors if multiple lines res@xyLineThicknessF = 2.5 ; default is 1.0 res@xyDashPattern = 2 ; default is 0 (solid line) res@xyMarkLineMode = "MarkLine" ; "lines", "markers" res@xyMarker = 16 ; default is 0 (asterisk) res@xyMonoDashPattern = True ; if want solid lines for all curves res@tiMainString = "This is a main title" xyplot = gsn_csm_xy(wks,x,y,res) ; use gsn_csm_y if no X values. end