<div dir="ltr">Hi Jon,<div><br></div><div>You should note that NCL is a zero-index language. This means that your colors are indexed 0-253 for that table, as BlueYellowRed contains 256 colors as a color map and 254 as a color palette.</div>

<div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Graphics/ColorTables/BlueYellowRed.shtml">http://www.ncl.ucar.edu/Document/Graphics/ColorTables/BlueYellowRed.shtml</a><br></div><div><br></div><div>Without looking at your code, it looks like you&#39;re trying to explicitly reference a 255th color, which simply doesn&#39;t exist. There are a few ways to manage this if you need a full 255 colors. The most common is probably cnSpanFillPalette, which I&#39;m pretty sure will duplicate colors at points within the spectrum to create the extra colors if the count of your levels exceeds the count of your colors. It&#39;s generally used for making a plot with fewer plot levels than there are colors, however. If you are looking to do something else with the colors, I can give you some more complicated FillColor management suggestions as well that I tend to use in most of my plots.</div>

<div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnSpanFillPalette">http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnSpanFillPalette</a><br></div><div><br></div><div>

Let us know if you need any additional help...</div><div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div>

<div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div>

</div></div>
<br><br><div class="gmail_quote">On Thu, Sep 5, 2013 at 12:46 PM, jonathan meyer <span dir="ltr">&lt;<a href="mailto:tallj03@hotmail.com" target="_blank">tallj03@hotmail.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><div dir="ltr">Hi Devs,<div><br></div><div>I&#39;ve been enjoying the functionality of the cnFillPalette resource for my panel plots where different color tables are desired.</div><div><br></div><div>I am wondering how to reset the last contour fill which is reassigned to a black color (foreground color).</div>

<div><br></div><div>From the documentation:</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13px;line-height:16px">&quot;If you set <a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillPalette" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;text-decoration:none;color:rgb(0,64,255);font-family:verdana,sans-serif;font-weight:normal" target="_blank"><em style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">cnFillPalette</em></a> using a predefined color map, it will have two fewer elements than if you set <a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/wk.shtml#wkColorMap" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;text-decoration:none;color:rgb(0,64,255);font-family:verdana,sans-serif;font-weight:normal" target="_blank"><em style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">wkColorMap</em></a> using the same color map. This is because the <a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/wk.shtml#wkColorMap" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;text-decoration:none;color:rgb(0,64,255);font-family:verdana,sans-serif;font-weight:normal" target="_blank"><em style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">wkColorMap</em></a> resource contains special elements (0 and 1) for the <code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">Background</code> and <code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">Foreground</code> colors, whereas the palette-type resources do not.&quot;</span></div>

<div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13px;line-height:16px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13px;line-height:16px"><br>

</span></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13px;line-height:16px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13px;line-height:16px"><br>

</span></div><div>My question is how to reset that color? Is it as simple as giving a named color to a different resource?</div><div><br></div><div>For future search reference, here is the warning generated when using the resource and a 256 color table (resdiff@cnFillPalette        = &quot;BlueYellowRed&quot;)</div>

<div><br></div><div>warning:ContourPlotSetValues: color index (255) exceeds size of palette, defaulting to foreground color for entry (21)</div><div><br></div><div><br></div><div><br></div><div>Thanks for the time!</div>
<div>
<br></div><div>Jon</div><div> </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>