<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hi Mary,
<div><br /></div>
<div>Thanks for the tips in the table. However, there is a better example:</div>
<div><br /></div>
<div><a href="https://www.ncl.ucar.edu/Applications/raster.shtml">https://www.ncl.ucar.edu/Applications/raster.shtml</a></div>
<div><br /></div>
<div>However, I’m having some trouble with the finer details of the plot. It involves getting the tick labels just in the correct place.</div>
<div><br /></div>
<div>My code below is basically example 6, which looks very much like the same coordinate values of one of the iSCCP products: </div>
<div><img src="http://cfmip.metoffice.com/cosp/quicklooks/clisccp_obs.png" width="500" /><br /></div>
<div>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln">I’m trying to compare my model output with the above figure but there are some issue:</span></code></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln">1.) In the ncl example 6, the figure dimension is 7x6 while mine is 7x7. When I plot it as below I get log x-axis despite my values not being log.</span></code></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln">2.) None of the labels ended up on the major axis. </span></code></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln">I’m not sure how NCL axis works. Could I get some tips on how to force the axis to fall on the grid edges as in the figure above?</span></code></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln"> </span></code></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pln">im </span><span class="pun">=</span><span class="pln"> </span><br /></code><span style="font-family: -apple-system, sans-serif;"> (/(/0.60 0.81 1.86 3.83 3.09 0.78 0.01</span><span style="font-family: -apple-system, sans-serif;">/), </span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">0.45 0.63 1.47 4.96 5.45 2.27 0.28</span><span style="font-family: -apple-system, sans-serif;">/), \</span><span style="font-family: -apple-system, sans-serif;"> </span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">0.60 0.66 0.88 2.03 2.45 1.56 0.50</span><span style="font-family: -apple-system, sans-serif;">/),</span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">0.76 0.91 1.02 1.17 1.46 1.44 0.63</span><span style="font-family: -apple-system, sans-serif;">/), \</span></pre>
<pre class="lang-py prettyprint prettyprinted"><span style="font-family: -apple-system, sans-serif;"> </span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">0.85 1.41 1.32 0.88 0.91 1.07 0.72</span><span style="font-family: -apple-system, sans-serif;">/),</span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">1</span><span style="font-family: -apple-system, sans-serif;">.55 1.84 1.24 0.70 0.41 0.46 0.36</span><span style="font-family: -apple-system, sans-serif;">/),</span><span style="font-family: -apple-system, sans-serif;"> </span><span style="font-family: -apple-system, sans-serif;">(/</span><span style="font-family: -apple-system, sans-serif;">7.19 1.73 0.60 0.28 0.14 0.08 0.05/)/) </span></pre>
<pre class="lang-py prettyprint prettyprinted"><code><span class="pun">x =</span><span class="pln"> </span><span class="pun">(/0.0,</span><span class="lit">0.3</span><span class="pun">,</span><span class="lit">1.3</span><span class="pun">,</span><span class="lit">3.6</span><span class="pun">,</span><span class="lit">9.4</span><span class="pun">,</span><span class="lit">23.0</span><span class="pun">,</span><span class="lit">60.0,100.0/)</span><span class="pln">
y </span><span class="pun">=</span><span class="pln"> </span><span class="pun">(/</span><span class="lit">1000.0</span><span class="pun">,</span><span class="lit">800.0</span><span class="pun">,</span><span class="lit">680.0</span><span class="pun">,</span><span class="lit">560.0</span><span class="pun">,</span><span class="lit">440.0</span><span class="pun">,</span><span class="lit">310.0</span><span class="pun">,</span><span class="lit">180.0/)</span></code></pre></div>
<div>
<div>im!0=“x"</div>
<div>im!1 =“y”</div>
<div>im&x = x</div>
<div>im&y = y</div>
<div><br /></div>
<div>wks = gsn_open_wks("png","raster") ; send graphics to PNG file</div>
<div>res = True ; plot mods desired</div>
<div>res@cnFillOn = True ; Turn on contour fill</div>
<div>res@cnFillMode = "RasterFill" ; Turn on raster fill</div>
<div>res@cnLinesOn = False ; Turn off contour lines</div>
<div>res@cnLineLabelsOn = False ; turns off contour line labels</div>
<div>res@cnFillPalette = "BlAqGrYeOrReVi200";MPL_viridis"</div>
<div>res@lbLabelBarOn = True</div>
<div>res@lbOrientation = "vertical" ; vertical label bar</div>
<div><br /></div>
<div>plot = gsn_csm_contour(wks,im,res) ; contour the variable</div>
</div>
<div><br /></div>
<div>Best,</div>
<div>/M</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
<p class="MsoNormal"><b><i>Marston S. Ward</i></b><br /></p>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On 16 Oct 2017, 21:31 +0200, Mary Haley <haley@ucar.edu>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Marston,</div>
<div class="gmail_default" style="font-size:small"><br /></div>
<div class="gmail_default" style="font-size:small">Take a look at this page:</div>
<div class="gmail_default" style="font-size:small"><br /></div>
<div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/table.shtml">http://www.ncl.ucar.edu/Applications/table.shtml</a><br /></div>
<div class="gmail_default"><br />
These are examples showing how to draw filed cells (square or triangle) based on some criteria. I think table_4.ncl colors the cells by ranges of values.</div>
<div class="gmail_default"><br /></div>
<div class="gmail_default">--Mary</div>
<div class="gmail_default"><br /></div>
</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Mon, Oct 16, 2017 at 1:03 PM, Marston Johnston <span dir="ltr"><<a href="mailto:shejo284@gmail.com" target="_blank">shejo284@gmail.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div bgcolor="white" lang="EN-GB" link="blue" vlink="purple" xml:lang="EN-GB">
<div class="m_-1915451739927143287WordSection1">
<p class="MsoNormal"><span>Hi Dennis,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>At first glance it would appear so, but example 6 calculates the percentage. In the ucar example: <u></u><u></u></span></p>
<p class="MsoNormal"><span><a href="https://climatedataguide.ucar.edu/climate-data/isccp-international-satellite-cloud-climatology-project" target="_blank">https://climatedataguide.ucar.<wbr />edu/climate-data/isccp-<wbr />international-satellite-cloud-<wbr />climatology-project</a> <u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>The ISCCP cloud fraction is calculated for each bin instead of density of the frequency of occurrence. So in example 6 there are 2 datasets that are used as input data, but in the figure in question seems to use 3. <u></u><u></u></span></p>
<span class=""></span>
<p class="MsoNormal"><span class=""><span><u></u> <u></u></span></span></p>
<p class="MsoNormal"><span>/M<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Marston S. Ward, PhD<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Department of Earth Sciences<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">University of Gothenburg, Sweden<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Email: <a href="mailto:marston.johnston@gu.se" target="_blank"><span style="color:#0070c0">marston.johnston@gu.se</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">SkypeID: marston.johnston <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Phone: <a href="tel:+46%2031%20786%2049%2001" value="+46317864901" target="_blank">+46-31-7864901</a> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">Only the fruitful thing is true!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From:</span></b> <span style="font-size:12.0pt;color:black">ncl-talk <<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> on behalf of Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br />
<b>Date:</b> Monday, 16 October 2017 at 20:53<br />
<b>To:</b> Marston Ward <<a href="mailto:marston.johnston@gu.se" target="_blank">marston.johnston@gu.se</a>><br />
<b>Cc:</b> "<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br />
<b>Subject:</b> Re: [ncl-talk] joint-histogram<u></u><u></u></span></p>
</div>
<div>
<div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">I am not a graphics person.<br />
<br />
Looks like example 6<br />
<a href="https://www.ncl.ucar.edu/Applications/pdf.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr />Applications/pdf.shtml</a><br />
<br />
===<u></u><u></u></p>
</div>
<p class="MsoNormal">Really, a contour plot with raster mode.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Oct 16, 2017 at 12:46 PM, Marston Ward <<a href="mailto:marston.johnston@gu.se" target="_blank">marston.johnston@gu.se</a>> wrote:<u></u><u></u></p>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div>
<div>
<p class="MsoNormal">Hi guys!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I’m trying to develop a NCL script to produce the attached figure, which is a joint-histogram, but a bit different from what pdfxy produces.<u></u><u></u></p>
<p class="MsoNormal">I have a good idea of how this image is produced; but why reinvent the wheel? I don’t think that NCL has such a plot function, or am I mistaken?<u></u><u></u></p>
<p class="MsoNormal">Does anyone have such a script – and would like to share?<u></u><u></u></p>
<p class="MsoNormal">This is something I can definitely think of contributing to the NCL. <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Best,<u></u><u></u></p>
<p class="MsoNormal">/M<u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">Marston S. Ward, PhD</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">Department of Earth Sciences</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">University of Gothenburg, Sweden</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">Email: <a href="mailto:marston.johnston@gu.se" target="_blank"><span style="color:#0070c0">marston.johnston@gu.se</span></a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">SkypeID: marston.johnston </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">Phone: <a href="tel:+46%2031%20786%2049%2001" target="_blank">+46-31-7864901</a> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">Only the fruitful thing is true!</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:#0070c0">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br />
______________________________<wbr />_________________<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" target="_blank">http://mailman.ucar.edu/<wbr />mailman/listinfo/ncl-talk</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">______________________________<wbr />_________________ ncl-talk mailing list <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> List instructions, subscriber options, unsubscribe: <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr />mailman/listinfo/ncl-talk</a> <u></u><u></u></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 /></div>
</blockquote>
</div>
</body>
</html>