<div dir="ltr">Hi Guido,<div>I will file a JIRA ticket for this issue; I am guessing you are the first one to report it. </div><div><br></div><div>I tried a variety of ways to get the filled curve to get drawn after the regular curves to no avail. If you need to have your axes the original way you had them I think your idea of drawing a polygon is a good one. See the first draw order example here:</div><div><a href="http://www.ncl.ucar.edu/Applications/draworder.shtml#ex1">http://www.ncl.ucar.edu/Applications/draworder.shtml#ex1</a><br></div><div>You would make the bottom of your polygon equal to your set YRefLine, in this case = 0.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 2:26 PM, Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I already thought of swapping the axes. That made the trick indeed, although I would have preferred to keep fluxes axis on the left and Qnet on the right. <div>Thank you!</div><div><br></div><div>P.S. Any plans about controlling the Draw Order in xy2 plots in the future? <br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><br>Guido Cioni</div><div><a href="http://guidocioni.altervista.org" target="_blank">http://guidocioni.altervista.org</a> </div><div><br></div></div><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div>
</div>
<br><div><blockquote type="cite"><div>Il giorno 25 mag 2016, alle ore 22:13, Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> ha scritto:</div><br><div><div dir="ltr">Hi Guido,<div>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 changing this:</div><div><div><span style="font-family:Menlo">plot(j)=gsn_csm_xy2(wks,time,</span><span style="font-family:Menlo">data,data2,res,res2)</span><br></div><div><font face="arial, helvetica, sans-serif">to this:</font></div><div><span style="font-family:Menlo">plot(j)=gsn_csm_xy2(wks,time,</span><span style="font-family:Menlo">data2,data,res2,res)</span></div></div><div>Let ncl-talk know if that does not work for you. </div><div>Adam</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 3:19 AM, Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear all,<div>I’ve been trying to produce a simple <font face="Menlo">xy2</font> 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 <font face="Menlo">xyCurveDrawOrder</font> and <font face="Menlo">tfPolyDrawOrder</font> 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. </div><div>Is there any other way to achieve the same results? Maybe using <font face="Menlo">polyline</font>? </div><div>Attached you find a snippet of the code (only the relevant part) and the resulting plot. </div><div><br></div><div><div><font face="Menlo" style="font-size:11px"> do j=0,dimsizes(case)-1</font></div><div><font face="Menlo" style="font-size:11px"> </font></div><div><div><font face="Menlo" style="font-size:11px"> plot=new(dimsizes(case), graphic)</font></div><div><font face="Menlo" style="font-size:11px"> poly=new(dimsizes(case), graphic)</font></div><div><font face="Menlo"><span style="font-size:11px"> wks = gsn_open_wks ("pdf",”tserie") ; open workstation</span></font></div><div><font face="Menlo" style="font-size:11px"> res = True ; plot mods desired</font></div><div><font face="Menlo" style="font-size:11px"> res@xyDashPatterns=(/0,0/)</font></div><div><font face="Menlo" style="font-size:11px"> res@xyLineThicknessF=(/3,3/)</font></div><div><font face="Menlo" style="font-size:11px"> res@xyLineColors=(/"blue","red”/)</font></div></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><font face="Menlo" style="font-size:11px"> data= (/lhflx, shflx/)</font></div><div><font face="Menlo" style="font-size:11px"> data2 = qnet</font></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><font face="Menlo" style="font-size:11px"> res2= True</font></div><div><font face="Menlo" style="font-size:11px"> res2@gsnDraw = False</font></div><div><font face="Menlo" style="font-size:11px"> res2@gsnFrame = False</font></div><div><font face="Menlo" style="font-size:11px"> res2@xyLineColor = "gold"</font></div><div><font face="Menlo" style="font-size:11px"> res2@gsnYRefLine = 0.0</font></div><div><font face="Menlo" style="font-size:11px"> res2@gsnAboveYRefLineColor = “lightyellow"</font></div><div><font face="Menlo" style="font-size:11px"> </font></div><div><font face="Menlo" style="font-size:11px"> plot(j)=gsn_csm_xy2(wks,time,data,data2,res,res2)</font></div><div><font face="Menlo" style="font-size:11px"> </font></div><div><font face="Menlo" style="font-size:11px">delete([/lhflx, shflx, serie, time, data /])</font></div><div><font face="Menlo" style="font-size:11px"> end do</font></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><font face="Menlo" style="font-size:11px">plnres = True</font></div><div><font face="Menlo" style="font-size:11px">gsn_panel(wks,plot,(/3,1/),plnres)</font></div><div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div></div></div></div><br><div style="word-wrap:break-word"><div><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>Guido Cioni</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista.org/" target="_blank">http://guidocioni.altervista.org</a> </div>
</div>
<br></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>