[ncl-talk] cnFillPalette
Laura Fowler
laura at ucar.edu
Wed Feb 20 14:31:07 MST 2019
Hello:
I am trying to make a panel plot using two separate color maps, as in
color_9_new.ncl. Of course, I am not able to get what I think I would get
as the last two colors of my color map are white and black when using
cnFillPalette.
My first color map is as follows:
*cheyenne6* 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 using
res at cnFillPalette = "myRadar2", I get the following warning:
warning:ContourPlotSetValues: color index (13) exceeds size of palette,
defaulting to foreground color for entry (11)
warning:ContourPlotSetValues: color index (14) exceeds size of palette,
defaulting to foreground color for entry (12)
(0) --- n = 2 --- strs = c) KFu - DEEPC+THOM
warning:ContourPlotSetValues: color index (13) exceeds size of palette,
defaulting to foreground color for entry (11)
warning:ContourPlotSetValues: color index (14) exceeds size of palette,
defaulting to foreground color for entry (12)
(0) --- n = 4 --- strs = e) GFu-TMPA
warning:ContourPlotSetValues: color index (13) exceeds size of palette,
defaulting to foreground color for entry (11)
warning:ContourPlotSetValues: color index (14) exceeds size of palette,
defaulting to foreground color for entry (12)
.
.
.
which I guess makes sense since cnFillPalette will have two fewer elements,
according to the documentation. What do I need to do to make this work. Do
I need to add the ForegroundColor and BackgroundColor to the color map? How
to do this? (It works perfectly well using gsn_define_colormap).
I also tried to use res at cnSpanFillPalette = False (or True) but that did
not do anything (What is it supposed to do anyway).
Many thanks for your help,
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/20190220/998139d7/attachment.html>
More information about the ncl-talk
mailing list