load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" begin type = "x11" ; type = "pdf" ; type = "ps" ; type = "ncgm" wks = gsn_open_wks(type,"plt_ts") ; Create a plot workstation data = readAsciiTable("input.txt", 7, "integer", 0) ; read the data file res = True res@tmXTOn = True res@xyLineThicknesses = 2 res@xyLineColor = "blue" res@tiYAxisString = "Title" res@tiXAxisString = "Simulation Time" res@tiMainString = "Main Title" ;;;;;;;;;;;;;;;;;;;;;;; ;;; Make x axis ;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;; date = sprinti("%0.2i",data(:,1))+"/"+sprinti("%0.2i",data(:,2))+" "+sprinti("%0.2i",data(:,4)) ; ndate = dimsizes(date) ; ind_date = new(ndate,string) ; x1_offset = date(0) ; x1 = ispan(0,ndate-1,1) ; x1 = ind_date ; res@tmXTLabelsOn = True ; res@tmXTMode = "Explicit" ; res@tmXTValues = date ; print(date) ; print(data(:,6)) plot = gsn_csm_xy(wks,date,data(:,6),res) end