[ncl-talk] Filling area between curve and x-axis in xy2 plot
asphilli at ucar.edu
Wed May 25 14:13:43 MDT 2016
I tested your code here and am seeing what you are seeing. I did get it to
work though by changing the order of the plots in gsn_csm_xy2. So, try
Let ncl-talk know if that does not work for you.
On Wed, May 25, 2016 at 3:19 AM, Guido Cioni <guidocioni at gmail.com> wrote:
> Dear all,
> I’ve been trying to produce a simple xy2 plot with two lines and a filled
> curve. The problem is that the latter, which is drawn together with the
> curve in the second y axis, cover the other two lines. I tried to play
> around with the resources xyCurveDrawOrder and tfPolyDrawOrder but
> nothing did the trick. I think that there is no special resource that
> controls the draw order of elements in xy2 plots, thus the second curve is
> always drawn on top of the others.
> Is there any other way to achieve the same results? Maybe using polyline?
> Attached you find a snippet of the code (only the relevant part) and the
> resulting plot.
> do j=0,dimsizes(case)-1
> plot=new(dimsizes(case), graphic)
> poly=new(dimsizes(case), graphic)
> wks = gsn_open_wks ("pdf",”tserie") ; open workstation
> res = True ; plot mods desired
> res at xyDashPatterns=(/0,0/)
> res at xyLineThicknessF=(/3,3/)
> res at xyLineColors=(/"blue","red”/)
> data= (/lhflx, shflx/)
> data2 = qnet
> res2= True
> res2 at gsnDraw = False
> res2 at gsnFrame = False
> res2 at xyLineColor = "gold"
> res2 at gsnYRefLine = 0.0
> res2 at gsnAboveYRefLineColor = “lightyellow"
> delete([/lhflx, shflx, serie, time, data /])
> end do
> plnres = True
> Guido Cioni
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ncl-talk