Problem with plotting two 1D arrays on same plot

From: Ibo Ze <ibo85_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 26 2010 - 15:25:17 MDT

Hi,

I want to plot 2 separate 1D arrays (like xy_plot) on a same. But subscript mismatch error appear each time. Please help with this.

Thanks,
Ibo

Following is what i use:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
  f1 = addfile("6104_pk_june_avg.nc","r")
  f2 = addfile("6104_sec_june_avg.nc","r")
  a1 = f1->a
  a2 = f2->a
  dim = dimsizes(a1)
  dim = dimsizes(a2)
  time = ispan(1961,2004,1)
  data = new((/2,dim/),float)
  data(0,:) = f1(0,:)
  data(1,:) = f2(0,:)
  wks = gsn_open_wks ("x11","aa") ; open ps file
  res = True ; plot mods desired
  res@tiMainString = "June Climatology 1961-2004"
  res@xyLineThicknesses = (/1.0,2.0/)
  res@xyLineColors = (/"red","blue"/)
  res@trYMinF = 0.0
  res@trYMaxF = 10.0
  res@trXMinF = 1960
  res@trXMaxF = 2004
  res@tiXAxisString = "time"
  res@tiYAxisString = "Precipitation (mm/day)"
  plot = gsn_csm_xy(wks,time,data,res)
end

      

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 26 15:25:23 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT