begin ncurve = 3 npts = 129 ; ; Read ASCII file xy.asc ; x1_y3 = asciiread(ncargpath("data")+"/asc/xy.asc",4*129,"float") ; ; xy.asc has 4 vars of length 129 longitudes, lon, u, v, t ; ; The data is taken at 43N latitude. Longitude is an index ; 1-129 standing for 0 deg - 360 deg in steps of 360/128 ; u and v are in m/s, and t is in deg K. ; lon = (x1_y3(0:512:4) -1.) * 360./128. u = x1_y3(1:513:4) v = x1_y3(2:514:4) t = x1_y3(3:515:4) wks = gsn_open_wks("png","xy5e") res1 = True ; Plot options desired. res2 = True res3 = True res1@gsnMaximize = True ; If you don't set this, your plot ; will run off the right side. res1@xyLineThicknessF = 3 ; Set line thickness and res1@xyLineColor = "red" ; curve colors for each set ; of curves. res2@xyLineThicknessF = 3 res2@xyLineColor = "green" res3@xyLineThicknessF = 3 res3@xyLineColor = "blue" res1@trXMaxF = 360 ; Max value for X axis. The X axis is ; the same for all curves, so use the ; first resource list to control X axis. res1@tmYLFormat = "f" ; Don't include ".0" on left Y axis labels res1@tiYAxisString = "t" ; Set the Y axis strings for each axis. res2@tiYAxisString = "u" res3@tiYAxisString = "v" res1@tiXAxisString = "longitude" ; Only one X axis label needed. res1@tiYAxisFontColor = "red" ; Set font colors for Y axis labels. res2@tiYAxisFontColor = "green" res3@tiYAxisFontColor = "blue" plot = gsn_csm_xy3(wks,lon,t,u,v,res1,res2,res3) end