shading a XY plot

From: Mahesh Varma <mkmvarma_at_nyahnyahspammersnyahnyah>
Date: Sat Jan 18 2014 - 15:55:40 MST

Hi,
I have a time series of precipitation from CMIP5 model ensemble. I would
like to overlay a standard deviation of the precipitation with a grey
shading. I tried to use gsn_add_ploygon but for some reason it is not
working. I am not sure if I am doing anything wrong in using
"gsn_add_ploygon" function. I have the precipitation time series and the
standard deviation of the precipitation.
The code that I have is
;------------------------------------
years_avg_smooth = cdf_file_all->years_avg_smooth ; years
pr_ts_avg_smooth = cdf_file_all->pr_ts_avg_smooth; avg precipitation
pr_ts_sd_smooth = cdf_file_all->pr_ts_sd_smooth; sd of precipitation

min_pr_ts_avg = pr_ts_avg_smooth-pr_ts_sd_smooth
max_pr_ts_avg = pr_ts_avg_smooth+pr_ts_sd_smooth

; Plot statements
plot(0) = gsn_csm_xy (wks,years_avg_smooth,pr_ts_obs_avg_smooth,rts)

 gsres = True ; poly res
 gsres@tfPolyDrawOrder = "Predraw" ; draw this first
 gsres@gsFillColor = "grey58" ; color chosen
 dummy = gsn_add_polygon (wks,plot(0),min_pr_ts_avg,max_pr_ts_avg,gsres)
;-------------------------------------------------------------------------------------------------------------------

Thanks,
Mahesh

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Jan 18 15:55:50 2014

This archive was generated by hypermail 2.1.8 : Sun Jan 19 2014 - 21:56:35 MST