<div dir="ltr"><div><div><div><div>Hi Jared,<br></div>How about the attached script, this should work even if the threshold contour line is not in middle (see attached plot). This is based on the example: <a href="https://www.ncl.ucar.edu/Applications/Scripts/contoursym_4.ncl">https://www.ncl.ucar.edu/Applications/Scripts/contoursym_4.ncl</a><br></div>The 256 colour limit would still be there, I think. <br></div><div><br></div>Cheers<br></div>Rashed<br><div><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 13, 2018 at 12:51 PM, Jared Lee <span dir="ltr"><<a href="mailto:jaredlee@ucar.edu" target="_blank">jaredlee@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rashed,<div><br></div><div>Thanks for the example! That method works fine if you have your threshold contour line (0ºC, say) is exactly in the middle of your set of contour lines, but not if you have different numbers of contours above and below your threshold value to split the colorbars/colormaps, unfortunately. And it also limits you to combining colormaps that would total no more than 256 colors.</div><div><br></div><div>What I ended up doing to get a similar effect (though not explicitly blending two colormaps) was to play with cnFillPatterns and make the contour intervals below 0ºC be either cross-hatched or stippled (and cnFillScaleF changes the stipple density), as in the attached image (note that cnFillMode must be set to "AreaFill" to use fill patterns). That might be my compromise solution, at least for now.</div><div><br></div><div>It would still be nice to be able to return the names of colors (or RBGA values) that are assigned to the various contour levels (after setting cnFillPalette to a named colormap and setting cnMinLevelValF, cnMaxLevelValF, and cnLevelSpacingF), and then explicitly supply different color names (or opacities) for some of the intervals. I'm not sure how to return the names of colors that are actually being used with a given set of contour levels, though.</div><div><br></div><div>Jared</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 12, 2018 at 6:50 PM, Rashed Mahmood <span dir="ltr"><<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Jared,<br></div>I think it's easy combine two color maps to get what you want. See attached script and the figure. the input file is NCEP surface air temperature.<br><br></div>Cheers,<br></div>Rashed<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-4968363643899207119h5">On Mon, Feb 12, 2018 at 4:33 PM, Jared Lee <span dir="ltr"><<a href="mailto:jaredlee@ucar.edu" target="_blank">jaredlee@ucar.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-4968363643899207119h5"><div dir="ltr">Hi all,<div><br></div><div>Has anyone out there made any plots where the colorbar/colormap is part grayscale, part color? For example, what I'd like to do for one application is make some plots with a color palette like "NCV_bright," for instance, where temperatures below 0ºC (say) get plotted in a grayscaled version of the color palette, but grid cells with values above 0ºC get plotted with the regular full-color palette. How would I go about doing that? Would I have to manually replace the sub-zero part of my color palette with various named gray colors? Thanks for any tips or ideas!</div><div><br></div><div>Jared<br clear="all"><div><br></div>-- <br><div class="m_-4968363643899207119m_-1383902786888717873m_-2356655758053042897gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div><div><div><font face="courier new, monospace">==============================<wbr>=<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: <a href="tel:(303)%20497-8485" value="+13034978485" target="_blank">303.497.8485</a> (w)</font><div><font face="courier new, monospace">Web: <a href="https://staff.ucar.edu/users/jaredlee" target="_blank">https://staff.ucar.edu/users/j<wbr>aredlee</a><br>==============================<wbr>=</font><br></div></div></div></div></div>
</div></div>
<br></div></div>______________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-4968363643899207119gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div><div><div><font face="courier new, monospace">==============================<wbr>=<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: <a href="tel:(303)%20497-8485" value="+13034978485" target="_blank">303.497.8485</a> (w)</font><div><font face="courier new, monospace">Web: <a href="https://staff.ucar.edu/users/jaredlee" target="_blank">https://staff.ucar.edu/users/<wbr>jaredlee</a><br>==============================<wbr>=</font><br></div></div></div></div></div>
</div>
</blockquote></div><br></div>