<div dir="ltr"><div class="gmail_default" style="font-size:small">Xi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In order to duplicate a color bar from an existing image, you need a tool that is able to give you the RGB triplets of each color.  You can then turn this into a color table in NCL.</div><div class="gmail_default" style="font-size:small"><br class="">There are several free tools. I used one called &quot;Digital Color Meter&quot; on my Mac that gives me the RGB values as I hover my mouse over each color.<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The colors will not be exact, because the colors in each box vary slightly as you move your mouse around. I tried to use the color that was in the middle of a box.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">With this, I was able to create a simple &quot;bar.rgb&quot; file (attached), and then read this in with NCL to use it as a color map.  See the attached.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 20, 2014 at 11:37 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Mary,,<div><br></div><div>Thank you, it works, but i cant not mimic the attached labelbar that I found in the journal.</div><div>can you help me, please see attached, </div><div>how can I creat such colorbar with exact color as this labelbar. thank you so much for your</div><div>help..</div><div><br></div><div>Im looking forward to  your help.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chang,</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 3:39 PM, 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">I think what you want is this:</div><span><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="courier new, monospace"><span style="font-size:13px">res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;            </span><br style="font-size:13px"><span style="font-size:13px">res@cnLevels             = (/-35, -25, -22, -18, -14, -10, -7, -5, -3, -2,-1,-.25, 0 , \</span></font></div></span><div class="gmail_default" style="font-size:small"><font face="courier new, monospace"><span><span style="font-size:13px">                             .25, 1, 2, 3, 5, 7, 10, 14, 18, 22, 25 , 35 /)</span><br style="font-size:13px"></span><span style="font-size:13px">res@cnFillOn             = True</span><br style="font-size:13px"><span style="font-size:13px">res@cnFillColors         = (/16, 25, 45, 50, 60, 65, 81, 70, 78, 85, 90 , 0, \</span></font></div><span><div class="gmail_default" style="font-size:small"><font face="courier new, monospace"><span style="font-size:13px">                              0, 0, 90, 85, 78, 70, 81, 65, 60, 50, 45, 25, 16 /)</span><br style="font-size:13px"></font></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></span><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px">cnFillColors is meant to take an array of color index values into the current workstation color map, which is usually set by gsn_define_colormap.</span></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px">cnFillPalette is meant to take an actual color map name, like &quot;rainbow&quot;, which will be applied to a color contour plot, and fully spanned by default. You shouldn&#39;t use cnFillPalette and cnFillColors together.</span></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px">--Mary</span></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Nov 18, 2014 at 6:51 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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Anybody know why did I get this error?<br><br>res@cnLevelSelectionMode = &quot;ExplicitLevels&quot;            <br>res@cnLevels      = (/-35, -25, -22, -18, -14, -10, -7, -5, -3, -2,-1,-.25, 0 , .25, 1, 2, 3, 5, 7, 10, 14, 18, 22, 25 , 35 /)<br>res@cnFillColors    = True<br>res@cnFillPalette = (/16, 25, 45, 50, 60, 65, 81, 70, 78, 85, 90 , 0, 0, 0, 90, 85, 78, 70, 81, 65, 60, 50, 45, 25, 16 /)<br><br></div>Thank you<br><div><br><br></div></div>
<br></div></div>_______________________________________________<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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>