<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you Adam<div class="">It works!!</div><div class=""><br class=""></div><div class="">Sun-<br class=""><div style=""><blockquote type="cite" class=""><div class="">On Sep 10, 2016, at 12:09 AM, Adam Phillips &lt;<a href="mailto:asphilli@ucar.edu" class="">asphilli@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Sun,<div class="">Here's how I would do it:</div><div class=""><span style="font-size:12.8px" class="">gsn_define_colormap(wks,"</span><wbr style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">ViBlGrWhYeOrRe”)&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">res = True</span></div><div class=""><span style="font-size:12.8px" class="">....</span></div><div class=""><span style="font-size:12.8px" class="">res@cnLevelSelectionMode = "ExplicitLevels"</span></div><div class=""><span style="font-size:12.8px" class="">res@cnLevels=(/-1000,-500,0,1000,5000,10000/) ; explicitly set contour levels</span></div><div class=""><span style="font-size:12.8px" class="">res@cnFillOn = True</span></div><div class=""><span style="font-size:12.8px" class="">res@cnFillColors = (/12,27,0,0,63,75,95/)</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Set the cnLevels to whatever you want, and then set the number of cnFillColors to one more than the number of cnLevels. The integers that I set in cnFillColors were chosen from the&nbsp;</span><span style="font-size:12.8px" class="">ViBlGrWhYeOrRe colormap website here:</span></div><div class=""><span style="font-size:12.8px" class=""><a href="http://www.ncl.ucar.edu/Document/Graphics/ColorTables/ViBlGrWhYeOrRe.shtml" class="">http://www.ncl.ucar.edu/Document/Graphics/ColorTables/ViBlGrWhYeOrRe.shtml</a></span><br class=""></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Color 12 is a blue, 27 is a blueish green, and so on. I set 0 (=background color/white) for all areas greater than or equal to -500 and less than 0, as well as all areas greater than or equal to 0 and less than 1000. (Note: I could have specified color 52 instead of 0 as 52 also looks white.)&nbsp;</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">I don't know if you want to have -1000 and 10000 be the absolute minimum and maximum values on your labelbar. If so, see labelbar example #14 here (3rd panel):</span></div><div class=""><span style="font-size:12.8px" class=""><a href="http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex14" class="">http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex14</a></span><br class=""></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Note that when you set lbLabelAlignment = "ExternalEdges" you will have to set the lbLabelStrings resource as the example shows. If you go with ExternalEdges some trial and error is likely needed to get the labelbar to exactly where you want it to be.</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Hope that helps. If you have further questions please respond to ncl-talk.</span></div><div class=""><span style="font-size:12.8px" class="">Adam</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Sep 8, 2016 at 12:03 PM, mireiyue <span dir="ltr" class="">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank" class="">mireiyue@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear NCL users,<br class="">
<br class="">
I want to create a legend that shows minimum -1000 and maximum 10000. I want to have different interval for negative and positive values. And I am using gsn_define_colormap(wks,"<wbr class="">ViBlGrWhYeOrRe”) and I want to put white color for zero.<br class="">
<br class="">
I haven’t found any information about this work.<br class="">
<br class="">
I will appreciate any related helps and comments.<br class="">
<br class="">
Thank you<br class="">
Sun-<br class="">
______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class=""><font color="#888888" class="">Adam Phillips <br class=""></font></span></div><span class=""><font color="#888888" class="">Associate Scientist,&nbsp; </font></span><span class=""><font color="#888888" class="">Climate and Global Dynamics Laboratory, NCAR<br class=""></font></span></div></div><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank" class="">www.cgd.ucar.edu/staff/asphilli/</a>&nbsp;&nbsp; </font></span><span class=""><font color="#888888" class="">303-497-1726 </font></span></div><span class=""><font color="#888888" class=""></font></span><div class=""><div class=""><span class=""><font color="#888888" class=""><br class=""></font></span><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank" class=""></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>