<div dir="ltr">Hi Frank,<div>Thank you f<br><div>Your script was most of the way there, it just needed a few extra resources and a resizing of the plot as it was running off of the right hand side of the page.</div><div>You had res/res2@vpWidthF set to .85 and vpXF set to .15, which resulted in the plot running from .15->1.05 in x-axis NDC space. (The valid NDC range is 0-1.)</div><div><br></div><div>I changed the res/res2@vpWidthF = .75, set res2@tmYLOn = False, set res2@tmYLLabelsOn = False, and all looks good to me.</div><div>I have attached a modified version of your script and the resulting image. </div><div>Adam</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 4, 2019 at 1:00 AM Kreienkamp Frank <<a href="mailto:Frank.Kreienkamp@dwd.de">Frank.Kreienkamp@dwd.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Adam,<br>
<br>
yes the path leads to the target. Thanks<br>
<br>
But I have the problem to shift the 2. axis (new, res2@) to the right side of the Box plot. What is wrong in the script?<br>
<br>
Thanks in advance<br>
Frank<br>
<br>
<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>> <br>
Gesendet: Montag, 2. Dezember 2019 22:36<br>
An: Kreienkamp Frank <<a href="mailto:Frank.Kreienkamp@dwd.de" target="_blank">Frank.Kreienkamp@dwd.de</a>><br>
Cc: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
Betreff: Re: [ncl-talk] 2nd axis with Boxplot<br>
<br>
Hi Frank,<br>
No there is not. However, you could use the vpXF/vpYF/vpWidthF/vpHeightF resources to set exactly where you want the boxplot to be drawn, and then specify the same resources, turn off all borders/tickmarks/labels except the Y-Axis, create a blank plot using gsn_csm_blank_plot, and draw one on top of another:<br>
<a href="https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_blank_plot.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_blank_plot.shtml</a><br>
<br>
<br>
Tick mark example #11 is similar, but overlays one plot on another using the overlay procedure.<br>
<a href="http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex11" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex11</a><br>
<br>
You will not want to use overlay, but you will want to set gsnDraw = True (=default) and gsnFrame = False in both resource lists.<br>
<br>
bres = True ; boxplot resource list<br>
bres@gsnFrame = False<br>
bres@vpXF = 0.2<br>
bres@vpYF = 0.8<br>
...<br>
plot = boxplot(....<br>
<br>
res = True ; blank plot resource list<br>
res@gsnFrame = False<br>
res@tmYUseLeft = False<br>
res@tmYROn = False<br>
res@tmYRLabelsOn = False<br>
res@tmXBOn = False<br>
res@tmXBLabelsOn = False<br>
... ; other tm resources may be needed.<br>
res@trYMinF = ..<br>
res@trYMaxF = ..<br>
res@tmYLMode = "Explicit"<br>
res@tmYLValues = (/.../)<br>
res@tmYLLabels = (/.../)<br>
<br>
bplot = gsn_csm_blank_plot(...<br>
frame(wks)<br>
<br>
Hope that gets you going in the right direction!<br>
Adam<br>
<br>
On Mon, Dec 2, 2019 at 1:56 AM Kreienkamp Frank via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <mailto:<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> > wrote:<br>
<br>
<br>
Hello,<br>
<br>
<br>
<br>
is there a function to have a 2nd y-axis with boxplots? Something like gsn_csm_xy2<br>
<br>
<br>
<br>
Thanks in advance<br>
<br>
Frank<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <mailto:<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>
<br>
<br>
-- <br>
<br>
Adam Phillips <br>
<br>
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR<br>
<br>
<a href="http://www.cgd.ucar.edu/staff/asphilli/" rel="noreferrer" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> <<a href="http://www.cgd.ucar.edu/staff/asphilli/" rel="noreferrer" target="_blank">http://www.cgd.ucar.edu/staff/asphilli/</a>> 303-497-1726 <br>
<br>
<br>
<<a href="http://www.cgd.ucar.edu/staff/asphilli" rel="noreferrer" target="_blank">http://www.cgd.ucar.edu/staff/asphilli</a>> <br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" 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>