<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">&lt;<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>&gt;</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 (&quot;pdf&quot;,”tserie&quot;)                ; 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=(/&quot;blue&quot;,&quot;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 = &quot;gold&quot;</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&quot;</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="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;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"></div></div></div></div><br><div style="word-wrap:break-word"><div><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;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>Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;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"><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">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"><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>