<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Adam,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Sorry for the delayed reply! Really appreciate the help - thanks for this tip :-) </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best wishes,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Sam</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Adam Phillips <asphilli@ucar.edu><br>
<b>Sent:</b> 13 April 2018 18:48:50<br>
<b>To:</b> Sam Hardy<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] Lat/lon tickmark and labels on panel plots</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Sam,
<div>"In simple terms, I want to stop NCL from drawing a tickmark and associated label when they're positioned less than a threshold distance away from the relevant edge of the box, but can't seem to find a way of doing this. Can anybody shed any light on the
issue? It seems like this task should be relatively easy to fix, but it's been bugging me for a while." </div>
<div>I do not know of a way to do this, so someone else will have to chime in for help with that. However, I think there is a solution to your problem.
<div><br>
<div>NCL assumes a single unit size for all paneled plots, and when the plot sizes are different between plots (as they are in your case because the lat/lon labels extending beyond the X/Y axis positions of the plot) it will insure that labels do not run into
one another. There's a way around this issue though by manually paneling everything. Take a look at Panel Example #39 here:
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<a href="http://www.ncl.ucar.edu/Applications/panel.shtml#ex39" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/panel.shtml#ex39</a><br>
</div>
<div><br>
</div>
I would recommend a similar approach, paneling manually using vpXF/vpYF/vpHeightF/vpWidthF with the latter two having the exact same value for each panel. (Note that when paneling manually vpWidthF (vpHeightF) settings refer to the distance in NDC units between
the two Y (X) axes <i>not</i> taking into account tick mark labels, so you can set each plot to be the same size.) The coding order would be similar to the examples:</div>
<div>1 - call gsn_panel (with the gsnPanelDebug set to True) to get the vpWidthF/vpHeightF values for each panel, and the vpXF and vpYF positions of each row and column. You are doing this only for the output from gsnDebugPanel.</div>
<div>2 - Set a single value for vpWidthF/vpHeightF that is used for every paneled plot, based on the output from step one. These settings may require some trial and error.</div>
<div>3 - Following the example and the information provided from step one, set the X/Y location for every plot using vpXF/vpYF. </div>
<div><br>
</div>
<div>If your script will be run over and over again I believe steps two and three code possibly be automated by writing the gsnDebugPanel information to a file, reading that file in andparsing the information. This would take some work though to make it happen.</div>
<div><br>
</div>
<div>Hope that helps!<br>
Adam <br>
</div>
</div>
</div>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">On Fri, Apr 13, 2018 at 11:02 AM, Sam Hardy <span dir="ltr">
<<a href="mailto:S.Hardy1@leeds.ac.uk" target="_blank">S.Hardy1@leeds.ac.uk</a>></span> wrote:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div id="x_m_-4271821241194716373divtagdefaultwrapper" dir="ltr">
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
Hi ncl-talk, </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
I'm trying to produce panel plots of basic variables, e.g. vertical velocity, for multiple ensemble members (see attached plot). I'm running NCL 6.4.0 (see attached script) on x86_64 GNU/linux. </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
In each of the panels, the plot is centred on the location of the storm, so the lat/lon positions of each panel are slightly different. <span style="font-size:12pt">When the lat/lon tickmark labels are close to the edge of the domain (e.g. (d) in attached plot),
the size of the panel is reduced relative to the other panels, producing uneven images. </span></p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<span style="font-size:12pt"><br>
</span></p>
<p style="margin-top:0px; margin-bottom:0px"><font size="3">This issue isn't really noticeable until I increase the label font size to something readable using the '</font><font size="3">tmXBLabelFontHeightF'/'<wbr>tmXLLabelFontHeightF' resources, but obviously
I'd like to be able to read the labels in the first place! </font></p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
In simple terms, I want to stop NCL from drawing a tickmark and associated label when they're positioned less than a threshold distance away from the relevant edge of the box, but can't seem to find a way of doing this. Can anybody shed any light on the issue?
It seems like this task should be relatively easy to fix, but it's been bugging me for a while. </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
I'm using 'gsn_panel' to produce the plots, but have also tried explicitly setting the panel positions and sizes using 'vpXF', 'vpYF', etc, without success. I've also tried setting 'tmXBMode = "Manual"' and using 'tmXBTickStartF', 'tmXBTickEndF', etc to force
NCL to only put tick marks in specified locations, but haven't managed to fix the issue. </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
The script I've attached plots a different variable (potential vorticity) and produces only 2 rather than 12 panels (to save time), but the issue is the same. I'll wait before ftp'ing the input files (> 4 GB each) because this isn't about finding a bug in the
script, but more about guidance on which function to use. </p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
Thanks in advance for any help,</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
Sam</p>
<p style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt; margin-top:0px; margin-bottom:0px">
<br>
</p>
<div id="x_m_-4271821241194716373Signature" style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">
<div id="x_m_-4271821241194716373divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif,Helvetica,EmojiFont,'Apple Color Emoji','Segoe UI Emoji',NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols">
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">Sam Hardy </span><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">Postdoctoral Researcher - Tropical Cyclone Intensification </span></p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif"></span><font size="2"><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
</font><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">Institute for Climate and Atmospheric Science</span><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">School of Earth and Environment</span><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">University of Leeds</span><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">Leeds</span><br style="font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:small">LS2 9JT</span><br>
</p>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="x_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>
</div>
</body>
</html>