hi,ncl users
I used the ncl file to draw teo lines in a picture ,when i excute the ncl file ,there is no error warning,but the picture is a blank one,please give me some advice
;*****************************************************
;2lines_ts.ncl
;*****************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;*****************************************************
begin
fils1 = addfile("/data/1000AD_0_volcanic.clm2.h0.1200_1299_ANN_nh_xy.nc","r")
fils2 = addfile("/data/1000AD_0_volcanic.clm2.h0.1200_1299_ANN_esa_xy.nc","r")
ts1 = fils1->TSA
ts2 = fils2->TSA
nyrs1 = dimsizes(ts1)
nyrs2 = dimsizes(ts2)
nyrs = max((/nyrs1,nyrs2/))
x_offset = 1200
time = ispan(0,nyrs-1,1)
x = time + x_offset
y = new((/2,nyrs/),double)
y(0,:) = ts1
y(1,:) = ts2
ymin = min((/y(0,:),y(1,:)/))
ymax = max((/y(0,:),y(1,:)/))
wks = gsn_open_wks("X11","ts_nh_esa")
res = True ; plot mods desired
res_at_gsnDraw = False ; don't draw yet
res_at_gsnFrame = False ; don't advance frame yet
res_at_trXMinF = 1200 ; set x-axis minimum
res_at_trYMinF = ymin
res_at_trYMaxF = ymax
res_at_xyLineColors = (/"Red","Black"/) ; colors chosen
res_at_xyLineThicknesses = (/2.,2./) ; line thicknesses
res_at_xyDashPatterns = (/0.,0./) ; make all lines solid
plot = gsn_csm_xy(wks,x,y,res)
end
Yours sherry
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 21 2006 - 04:05:11 MDT
This archive was generated by hypermail 2.2.0 : Mon Aug 21 2006 - 11:34:40 MDT