Hi Sherry,
You are setting gsnFrame and gsnDraw = False, which means the plot will
not be drawn and the frame will not be advanced.
Set both of those resources to True and you your plot should draw
correctly.
http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnDraw
http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnFrame
Good luck...
Adam
pengyb_at_cma.gov.cn wrote:
> 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 <mailto:res_at_gsnDraw> = False ;
> don't draw yet
> res_at_gsnFrame <mailto:res_at_gsnFrame> = False ;
> don't advance frame yet
>
>
> res_at_trXMinF <mailto:res_at_trXMinF> = 1200 ; set
> x-axis minimum
> res_at_trYMinF <mailto:res_at_trYMinF> = ymin
> res_at_trYMaxF <mailto:res_at_trYMaxF> = ymax
> res_at_xyLineColors <mailto:res_at_xyLineColors> = (/"Red","Black"/) ;
> colors chosen
> res_at_xyLineThicknesses <mailto:res_at_xyLineThicknesses> = (/2.,2./)
> ; line thicknesses
> res_at_xyDashPatterns <mailto: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
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Aug 21 2006 - 09:24:31 MDT
This archive was generated by hypermail 2.2.0 : Mon Aug 21 2006 - 11:34:40 MDT