<div dir="ltr">Hi Marston,<div><br></div><div>If you're trying to mask your plot with hatching based on data value, that's fairly straightforward to do using the plotting attribute cnFillPatterns. See info here:</div><div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Graphics/fill_patterns.shtml">https://www.ncl.ucar.edu/Document/Graphics/fill_patterns.shtml</a><br></div><div><a href="https://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png">https://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png</a><br></div><div><br></div><div>Here's an example snippet from one my scripts where I use hatching on contour fill areas below some certain threshold (in this case, temperatures below 0ºC):</div><div><br></div><div><div><font face="monospace, monospace">mapres@cnMinLevelValF   = -30.0</font></div><div><font face="monospace, monospace">mapres@cnMaxLevelValF   =  40.0</font></div><div><font face="monospace, monospace">mapres@cnLevelSpacingF  =   1.0</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">n_contours     := toint((mapres@cnMaxLevelValF - mapres@cnMinLevelValF)/mapres@cnLevelSpacingF) + 1</font></div><div><font face="monospace, monospace">n_contour_levs = n_contours + 1</font></div><div><font face="monospace, monospace">contour_values := fspan(mapres@cnMinLevelValF, mapres@cnMaxLevelValF, n_contours)</font></div><div><font face="monospace, monospace">contour_thresh = 0.0</font></div><div><font face="monospace, monospace">inds_hatch     := ind(contour_values.le.contour_thresh)</font></div><div><font face="monospace, monospace">mapres@cnMonoFillPattern      = False</font></div><div><font face="monospace, monospace">mapres@cnFillPatterns         := new(n_contour_levs, string)</font></div><div><font face="monospace, monospace">mapres@cnFillPatterns(:)            = "Solid"</font></div><div><font face="monospace, monospace">mapres@cnFillPatterns(inds_hatch)   = "CrossHatch_45"</font></div><div><font face="monospace, monospace">mapres@cnFillScaleF           = 0.30</font></div><div><font face="monospace, monospace">mapres@cnFillMode             = "AreaFill"</font></div></div><div><br></div><div>I hope that helps! Note that cnFillMode <u>must</u> be set to "AreaFill" in order for hatching or stippling to work.</div><div><br></div><div>Jared</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 3:47 AM, Marston Ward <span dir="ltr"><<a href="mailto:marston.johnston@gu.se" target="_blank">marston.johnston@gu.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
Hi,</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51);min-height:16px">
<br>
</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
I’m trying to mask a part of a  gsn_csm_contour plot using a “hatch”. I don’t want to simply mask out the area because I want to the data to still be visible under the hatch.</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
Is it possible to do this in NCL? A simple search returned nothing in NCL. Just wondering if this is possible and it so, are there examples.</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51);min-height:16px">
<br>
</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
Best,</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
<br>
</p>
<p style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Helvetica Neue";color:rgb(51,51,51)">
/M</p>
</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>

<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="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div><div><div><font face="courier new, monospace">===============================<br>Jared A. Lee, Ph.D.<br></font></div><font face="courier new, monospace">Project Scientist I<br></font></div><font face="courier new, monospace">Research Applications Laboratory<br></font></div><font face="courier new, monospace">National Center for Atmospheric Research<br>Boulder, Colorado, USA</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">Member, AMS Planning Commission<br><br></font></div><font face="courier new, monospace">Email: <a href="mailto:jaredlee@ucar.edu" target="_blank">jaredlee@ucar.edu</a> (w)<br></font></div><font face="courier new, monospace">Phone: 303.497.8485 (w)</font><div><font face="courier new, monospace">Web: <a href="https://staff.ucar.edu/users/jaredlee" target="_blank">https://staff.ucar.edu/users/jaredlee</a><br>===============================</font><br></div></div></div></div></div>
</div>