Re: Error with adding color using NhlNewColor

From: Gina Henderson <ginah_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 14 2011 - 12:16:00 MDT

Hi Adam and Dave,

Thanks so much for your response. I now understand the error message and
that makes total sense. In my case I do not really need such a large color
map so will probably choose a smaller one and just add a grey as I need it.
However I will save Adam's fix for future reference as no doubt will need it
at some point.

Thanks again,
Gina.

On Thu, Apr 14, 2011 at 2:09 PM, David Brown <dbrown@ucar.edu> wrote:

> Hi Gina,
> That is because the color map you have chosen uses all 256 colors that are
> available to NCL. Try using
> NhlSetColor instead:
>
> NhlSetColor(wks,255,.8,.8,.8) ; sets the last index in the color table to
> light gray.
>
>
> -dave
>
> On Apr 14, 2011, at 11:55 AM, Gina Henderson wrote:
>
> Hi all,
>
> I am trying to use the NhlNewColor to add grey to an existing color map. I
> have done this in previous scripts but for some reason in my current scrip I
> am getting a fatal error when try the following:
>
> gsn_define_colormap(wks,"BlueWhiteOrangeRed") ; define a different
> colormap.
>
> igrey = NhlNewColor(wks,8,.8,.8) ; Add light gray to colormap,
> ; for continents
> .
>
> giving me the error:
>
> *fatal:_NhlNewColor:no available colors*
>
> I am currently running ncl version 6.0 beta on a Macbook Pro.
>
> Any help or suggestions would be greatly appreciated.
> Gina.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 15 04:17:01 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 19 2011 - 18:32:03 MDT