[ncl-talk] color table issues
Dennis Shea
shea at ucar.edu
Wed Sep 27 16:45:55 MDT 2017
This question is not clear (to me).
To what "color table exercises" are you referring?
Also, it is best to indicate what version of NCL you are using:
%> ncl -V
----
If you have a variable that spans (say)
res at cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res at cnMinLevelValF = -275. ; set min contour level
res at cnMaxLevelValF = 350 ; set max contour level
res at cnLevelSpacingF = 25. ; set contour spacing
there are (350-(-275))/25 = 25 contour levels
By default, NCL adds 2 more levels to 'catch' values less than -275 and
greater than 350. Hence, 27 (25+2) colors.
Say you are using the 256 color table:
https://www.ncl.ucar.edu/Document/Graphics/ColorTables/amwg256.shtml
Then, by default, NCL will select every 27-th color so that
---
By default,
https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnSpanFillPalette
res at cnFillPallette = True
You can set this to False
res at cnFillPallette = False ; turn off spanning the color table
to select every color but if you use the above settings you will get the
1st 27 colors in the 256-colr table.
res at cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res at cnMinLevelValF = -275. ; set min contour level
res at cnMaxLevelValF = 350 ; set max contour level
res at cnLevelSpacingF = 2.5 ; set contour spacing
350-(-275))/256 = 2.44
res at cnLevelSpacingF = 2.44 ; set contour spacing
Would use very color
On Wed, Sep 27, 2017 at 3:09 PM, Grace Choi <gracesh27 at gmail.com> wrote:
> Hello everyone,
>
> When I try on color table exercises on the ncl website, I only can get 31
> colors to show up on my x11, as opposed to 255 colors that the example
> shows. Should I be particularly concerned about this?
>
> Also, I am wondering if the issue above is related to the issue I've been
> having with other functions, such as gsn_define_colormap(wks,"rainbow").
> When I expect to see actual rainbow colors, I only see different shades of
> blue on my map. Please help.
>
> Sincerely,
> Grace
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170927/da78911b/attachment.html>
More information about the ncl-talk
mailing list