<div dir="ltr"><div class="gmail_default" style="font-size:small">This is a good suggestion, to use named colors.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For the record, we recommend using &quot;cnFillPalette&quot; in place of &quot;gsn_define_colormap&quot;. This allows you to associated the colors directly with the contours (and hence enables you have other contour plots with their own colormaps).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Here&#39;s an example that you should be able to run as-is:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">







<p class=""><font face="courier new, monospace">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;   <br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;  </font></p>
<p class=""><font face="courier new, monospace">begin<br>  a = addfile(&quot;$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://uv300.nc">uv300.nc</a>&quot;,&quot;r&quot;)<br>  u = a-&gt;U(1,:,:)                       ; read July zonal winds</font></p>
<p class=""><font face="courier new, monospace">  wks = gsn_open_wks(&quot;x11&quot;,&quot;ce&quot;)</font></p>
<p class=""><font face="courier new, monospace">  res = True<br>  res@cnFillPalette = (/&quot;white&quot;,&quot;black&quot;,&quot;Snow&quot;     \       <br>               ,&quot;PaleTurquoise&quot;,&quot;PaleGreen&quot;,&quot;SeaGreen3&quot; ,&quot;Yellow&quot;  \<br>               ,&quot;Orange&quot;,&quot;HotPink&quot;,&quot;Red&quot;,&quot;Violet&quot;, &quot;Purple&quot;, &quot;Brown&quot;, &quot;Black&quot;/) </font></p>
<p class=""><font face="courier new, monospace">  res@cnFillOn             = True<br>  res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;              <br>  res@cnLevels             = (/-12,-8,-4,0,4,6,8,10,15,20,25,30,40/)</font></p>
<p class=""><font face="courier new, monospace">  plot = gsn_csm_contour_map(wks,u,res)</font></p>
<p class=""><font face="courier new, monospace">end</font></p><p class=""><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 8:30 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also:<br><pre>       wks    = gsn_open_wks(...)
       colors = (/&quot;white&quot;,&quot;black&quot;,&quot;Snow&quot;     \       
               ,&quot;PaleTurquoise&quot;,&quot;PaleGreen&quot;,&quot;SeaGreen3&quot; ,&quot;Yellow&quot;  \
               ,&quot;Orange&quot;,&quot;HotPink&quot;,&quot;Red&quot;,&quot;Violet&quot;, &quot;Purple&quot;, &quot;Brown&quot;, &quot;Black&quot;/) 
       gsn_define_colormap(wks, colors)               ; generate new color map
   
</pre><pre>       res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;              
       res@cnLevels             = (/0.1,1,5,10,20,30,50,75,100,150/) ; &quot;mm/day&quot; 
       </pre><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 8:10 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</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 class="gmail_default" style="font-size:small">You can set:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;</div><div class="gmail_default" style="font-size:small">res@cnLevels = (/-10,-8,-6,-4,-2,0,2,4/)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">&quot;cnLevels&quot; can be any spacing of values that you want. They don&#39;t have to be equally spaced, but they do have to be increasing.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you need to match certain levels to certain colors in a color map, then you may want to see example &quot;conLev_4.ncl&quot; at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/contourLev.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/contourLev.shtml</a><br></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"><span>On Mon, Nov 10, 2014 at 8:03 AM, Xi Chang <span dir="ltr">&lt;<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>&gt;</span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr">Hallo, Is there any way to create uneven color bar? for instence my plotting values ranging from -10 to +4, and I want to always plot 0 values as white. Thank you.<br></div>
<br></span>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>