Re: fill_bw_xy error

From: Jinqiang Chen <jcchen_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 02 2013 - 22:41:51 MDT

Dear Mary, I tried your code and it works even though I got the same warning. However, if I want to use two different filling colors for two upper-lower boundaries (e.g., 1 sigma and 2 sigma interval), the code will become more complicated and I don't know how to code in your way.   Anyway, I changed your code in the way I did for my code. The error still exists and I couldn't draw the filling for the Y3 but Y3 does appear on the top though.  Could you help me with this problem? Thanks! Kindly regards, Jinqiang Chen   -------------------- Jinqiang Chen Environmental Science and Engineering California Institute of Technology 1200 E. California Blvd.  mc: 131-24 Pasadena, CA  91125 Tel: +1 (626) 395-8704 Fax: +1 (626) 395-8535 email: jcchen_at_caltech.edu           jcchen_at_gps.caltech.edu http://www.gps.caltech.edu/~jcchen/ ________________________________ From: Mary Haley <haley_at_ucar.edu> To: Jinqiang Chen <jcchen_at_gps.caltech.edu> Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> Sent: Friday, August 2, 2013 10:42 AM Subject: Re: [ncl-talk] fill_bw_xy error Hi Jinqiang, The code is a little complicated to debug without being able to actually run it.  I created an example that seems to work for me, although I do get a warning: (0)    fill_bw_xy: Error: If filling between two curves, one set must be 2D, and the other 1D. Can you try running the attached and let me know if it works for you? The weird thing that I don't quite understand is that the Y2 curve is appearing on top, even though the Y3 curve was added last. Is this the issue you are talking about? --Mary On Jul 31, 2013, at 3:59 PM, Jinqiang Chen wrote: > Dear all, > > I have a problem with gsn_csm_xy3 when plotting three curves with their uncertainties. The error and part of my codes are as follows. I am also attaching the figure for reference. > > note: 1) the variables : global, co2, aer are 1D mean value, those with suffix _ext or _sigma are 2D, with the upper bound and lower bound of the 1D mean value. >          2) The purpose of my figure is to draw three curves with their uncertainties, but the figure I plotted gave me just three curves with uncertainties of two of them. >          3) I tried to switch the order of co2 and aer as well as those with suffix, it seems that only for the first two 2D parameters in the gsn_csm_xy3 filling can be done between the upper and lower bounds, leaving the third 2D vectors unfilled. > > Thank you very much! > > Jinqiang Chen > > ------------------------------beginning of error--------------------------------------- > (0)    fill_bw_xy: Error: If filling between two curves, one set must be 2D, and the other 1D. > (0)    fill_bw_xy: Error: If filling between two curves, one set must be 2D, and the other 1D. > warning:TransformPreDraw: tfPolyDrawList element 0 is invalid > warning:TransformPreDraw: tfPolyDrawList element 0 is invalid > --------------------------------endding of error---------------------------------------- > > > -------------------------------beginning of code-------------------------------------- > res                    = True              ; plot mods desired > res_at_gsnDraw            = False            ; don't draw yet > res_at_gsnFrame          = False            ; don't advance frame yet > > res_at_vpHeightF    = 0.4              ; change aspect ratio of plot > res_at_vpWidthF            = 0.6 > > res_at_trYMaxF            = 3.5 > res_at_trYMinF            = -1.5 > res_at_trXMinF              = 1860              ; set x-axis minimum > res_at_trXMaxF              = 2100 > > res_at_xyMonoLineColor    = False            ; want colored lines > res_at_xyLineColors      = (/"Blue"/) ; colors chosen > res_at_xyLineThicknesses    = (/4./)      ; line thicknesses > res_at_xyDashPatterns      = (/0./)      ; make all lines solid > > res_at_tiYAxisString        = "~F35~J~F~C"      ; add an axis title > res_at_txFontHeightF        = 0.0195            ; change title font heights > > resL = True > resL_at_gsnDraw            = False            ; don't draw yet > resL_at_gsnFrame          = False            ; don't advance frame yet > resL_at_trYMaxF            = 6.5 > resL_at_trYMinF            = 0.0 > resL_at_xyMonoLineColor    = False            ; want colored lines > resL_at_xyLineColors      = (/"red"/) ; colors chosen > resL_at_xyLineThicknesses  = (/4./)      ; line thicknesses > resL_at_xyDashPatterns      = (/0./)      ; make all lines solid > > resR = True > resR_at_gsnDraw            = False            ; don't draw yet > resR_at_gsnFrame          = False            ; don't advance frame yet > resR_at_trYMaxF            = 3.5 > resR_at_trYMinF            = 0. > resR_at_xyMonoLineColor    = False            ; want colored lines > resR_at_xyLineColors      = (/"yellow"/) ; colors chosen > resR_at_xyLineThicknesses  = (/4./)      ; line thicknesses > resR_at_xyDashPatterns      = (/0./)      ; make all lines solid > resL_at_amOrthogonalPosF = 0.62 >  top_plot = gsn_csm_xy3 (wks,time,global, co2, aer,  res, resR, resL)      ; create line plot > > ; Create a plot with the area between both curves filled in blue. >  delete(res_at_xyLineColors) >  res_at_gsnXYFillColors = "lightskyblue1" >  res_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  delete(resL_at_xyLineColors) >  resL_at_gsnXYFillColors = "lightskyblue1" >  resL_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  delete(resR_at_xyLineColors) >  resR_at_gsnXYFillColors = "lightskyblue1" >  resR_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  mid_plot  = gsn_csm_xy3 (wks,time,global_sigma, co2_sigma, aer_sigma, res, resR, resL)  ; Create filled XY plot. > ; Create a plot with the area between both curves filled in pink. >  res_at_gsnXYFillColors = "azure3" >  res_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  resL_at_gsnXYFillColors = "azure3" >  resL_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  resR_at_gsnXYFillColors = "azure3" >  resR_at_xyLineColor    = -1                          ; We don't want the line, so make it transparent. >  bot_plot  = gsn_csm_xy3 (wks,time,global_ext,co2_ext,aer_ext,  res, resR, resL)  ; >  overlay(bot_plot,mid_plot) >  overlay(bot_plot,top_plot) > -----------------------------------------endding of code------------------------------------------- >  > -------------------- > Jinqiang Chen > Environmental Science and Engineering > California Institute of Technology > 1200 E. California Blvd. > mc: 131-24 > Pasadena, CA  91125 > Tel: +1 (626) 395-8704 > Fax: +1 (626) 395-8535 > email: jcchen_at_caltech.edu >          jcchen_at_gps.caltech.edu > http://www.gps.caltech.edu/~jcchen/ > > > <global_tas.pdf>_______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Aug 2 22:42:09 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT