<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Arial",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Hello Adam,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">thanks a lot.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US">Frank<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Adam Phillips <asphilli@ucar.edu>
<br>
<b>Gesendet:</b> Mittwoch, 4. Dezember 2019 22:35<br>
<b>An:</b> Kreienkamp Frank <Frank.Kreienkamp@dwd.de><br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Betreff:</b> Re: [ncl-talk] 2nd axis with Boxplot<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Frank,<o:p></o:p></p>
<div>
<p class="MsoNormal">Thank you f<o:p></o:p></p>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I changed the res/res2@vpWidthF = .75, set res2@tmYLOn = False, set res2@tmYLLabelsOn = False, and all looks good to me.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I have attached a modified version of your script and the resulting image. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Adam<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Dec 4, 2019 at 1:00 AM Kreienkamp Frank <<a href="mailto:Frank.Kreienkamp@dwd.de">Frank.Kreienkamp@dwd.de</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">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" 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" 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" 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/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> <<a href="http://www.cgd.ucar.edu/staff/asphilli/" 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" target="_blank">http://www.cgd.ucar.edu/staff/asphilli</a>>
<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Adam Phillips </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#888888">Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   303-497-1726
</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>