begin fname = "$NCARG_ROOT/lib/ncarg/data/cdf/uv300.nc" f = addfile(fname,"r") u = f->U(:,:,{82}) ; Read "U" off the file ;---Define our own markers mstrings = (/"s","l"/) fontnums = (/35, 37/) xoffset = 0.0 yoffset = 0.0 ratio = 1.0 sizes = (/1.0,1.0/) angle = 0.0 wks = gsn_open_wks ("png","xy2j") mk = NhlNewMarker(wks, mstrings, fontnums, xoffset, \ yoffset, ratio, sizes, angle) res = True res@xyDashPattern = 0 ; solid res@xyLineThicknessF = 3 ; 3x thicker res@xyMarkLineMode = "MarkLines" ; markers and lines res@xyLineColors = (/"NavyBlue","Purple"/) res@xyMarkers = mk res@xyMarkerColors = (/"Orange","ForestGreen"/) res@xyMarkerThicknesses = (/ 3, 1/) res@tmXBMode = "Explicit" ; Explicitly label X axis res@tmXBValues = (/-90,-45,0,45,90/) ; Locations of desired tickmarks ; Labels at each tick mark res@tmXBLabels = (/"90~S~o~N~S","45~S~o~N~S","0","45~S~o~N~N","90~S~o~N~N"/) res@tmXBMinorOn = False ; Turn off minor ticks res@tmXTOn = False ; Turn off top and bottom res@tmYROn = False ; tickmarks res@pmLegendDisplayMode = "Always" ; Turn on legend ;---Customize legend res@xyExplicitLegendLabels = (/"Jan","Jul"/) ; Change legend labels res@lgLabelFontHeightF = 0.02 res@pmLegendWidthF = 0.15 ; Resize legend width res@pmLegendHeightF = 0.08 ; and height res@pmLegendOrthogonalPosF = -0.3 ; Move legend up res@pmLegendParallelPosF = 0.15 ; and to the right. res@lgPerimOn = False ; Turn off legend box plot = gsn_csm_xy (wks,u&lat,u,res) ; Draw an XY plot end