[ncl-talk] help needed with cnFillPalette

Laura Fowler laura at ucar.edu
Fri Apr 12 10:02:52 MDT 2019


Hi Rashed:
Setting res at gsnSpreadColors = False worked (I had it set to True in my
original script.) Many thanks for replying to my e-mail so quickly. You
saved my day.
Laura.



On Fri, Apr 12, 2019 at 7:33 AM Rashed Mahmood <rashidcomsis at gmail.com>
wrote:

> Hi Laura,
> How does your list of resources look like?
> A similar question has been answered by Mary long time ago:
> http://mailman.ucar.edu/pipermail/ncl-talk/2017-May/008895.html
>
> Cheers,
> Rashed
>
> On Thu, Apr 11, 2019 at 8:34 PM Laura Fowler <laura at ucar.edu> wrote:
>
>> Hello:
>>
>> I submitted a similar e-mail to ncl-talk a few weeks back but did not see
>> any reply. Since I have not yet been able to figure it out, I decided to
>> send this new e-mail regarding the use of cnFillPalette.
>>
>> I am trying to draw a panel plot with two sets of color bars, as is done
>> in a few examples regarding panel plots. Here is my personal color bar that
>> I would like to use:
>>
>> *cheyenne4* laura/colormaps> more myRadar2.rgb
>>
>> ncolors = 13
>>
>> #  r    g    b
>>
>> # 181  202  255   # super light blue
>>
>>   223  255  249   # super light blue
>>
>>     0  157  255   # light.blue
>>
>>     0  255  255   # cyan
>>
>>     8  175   20   # dark.green
>>
>>     0  255    0   # green
>>
>>   255  214    0   # yellow
>>
>>   255  152    0   # light.orange
>>
>>   255    0    0   # red
>>
>>   165   42   42   # dark read
>>
>>   240   80  240   # pink
>>
>>   121   51  160   # light.violet
>>
>>   195  163  212   # violet
>>
>>   255  255  255   # white
>>
>> When I use res at cnFillPalette = "MyRadar2" instead of
>> gsn_define_colormap, I get the following warnings:
>>
>> warning:ContourPlotSetValues: color index (23) exceeds size of palette,
>> defaulting to foreground color for entry (1)
>>
>> warning:ContourPlotSetValues: color index (44) exceeds size of palette,
>> defaulting to foreground color for entry (2)
>>
>> .
>>
>> .
>>
>> .
>>
>> warning:ContourPlotSetValues: color index (234) exceeds size of palette,
>> defaulting to foreground color for entry (11)
>>
>> warning:ContourPlotSetValues: color index (255) exceeds size of palette,
>> defaulting to foreground color for entry (12)
>>
>>
>>
>> which does not make sense to me. I tried to use an ncl pre-defined
>> colormap ("precip_diff_12lev") but the same type of warning occurred.
>>
>>
>> Can somebody help me figure this one out. I do not see what is different
>> from the examples shown for Panel Plots. Help really appreciated.
>>
>>
>> Thanks again,
>>
>> Laura
>>
>>
>>
>>
>> --
>>
>> !-------------------------------------------------------------------------------------------------------------
>> Laura D. Fowler
>>
>> Mesoscale and Microscale Meteorology Division (MMM)
>> National Center for Atmospheric Research
>> P.O. Box 3000, Boulder CO 80307-3000
>>
>> e-mail: laura at ucar.edu
>> phone: 303-497-1628
>>
>>
>> !-------------------------------------------------------------------------------------------------------------
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler

Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190412/8fee7429/attachment.html>


More information about the ncl-talk mailing list