[ncl-talk] help needed with cnFillPalette

Laura Fowler laura at ucar.edu
Thu Apr 11 21:34:15 MDT 2019


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

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


More information about the ncl-talk mailing list