[ncl-talk] fatal:CvtGenArrayToCmap:From array has wrong dimensionality

Mary Haley haley at ucar.edu
Tue Nov 18 07:39:14 MST 2014


I think what you want is this:

res at cnLevelSelectionMode = "ExplicitLevels"
res at cnLevels             = (/-35, -25, -22, -18, -14, -10, -7, -5, -3,
-2,-1,-.25, 0 , \
                             .25, 1, 2, 3, 5, 7, 10, 14, 18, 22, 25 , 35 /)
res at cnFillOn             = True
res at cnFillColors         = (/16, 25, 45, 50, 60, 65, 81, 70, 78, 85, 90 ,
0, \
                              0, 0, 90, 85, 78, 70, 81, 65, 60, 50, 45, 25,
16 /)

cnFillColors is meant to take an array of color index values into the
current workstation color map, which is usually set by gsn_define_colormap.

cnFillPalette is meant to take an actual color map name, like "rainbow",
which will be applied to a color contour plot, and fully spanned by
default. You shouldn't use cnFillPalette and cnFillColors together.

--Mary


On Tue, Nov 18, 2014 at 6:51 AM, Xi Chang <xi.chang01 at gmail.com> wrote:

> Anybody know why did I get this error?
>
> res at cnLevelSelectionMode = "ExplicitLevels"
> res at cnLevels      = (/-35, -25, -22, -18, -14, -10, -7, -5, -3,
> -2,-1,-.25, 0 , .25, 1, 2, 3, 5, 7, 10, 14, 18, 22, 25 , 35 /)
> res at cnFillColors    = True
> res at cnFillPalette = (/16, 25, 45, 50, 60, 65, 81, 70, 78, 85, 90 , 0, 0,
> 0, 90, 85, 78, 70, 81, 65, 60, 50, 45, 25, 16 /)
>
> Thank you
>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20141118/d5365b55/attachment.html 


More information about the ncl-talk mailing list