[ncl-talk] Problem in controling the colors with RGB array in Bar Chart

WUJIE 393069045 at qq.com
Sun Aug 25 04:46:59 MDT 2019


Hi NCL experts,


In the NCL Bar Chart, one can easily control the colors of the bar by using Named Color for "gsnXYBarChartColors".
However, below errors occurs if I use the RGB array for "gsnXYBarChartColors":


(0)	convert_color_to_rgba: Error: unknown color type.
(0)	   Returning all missing values.
warning:_NhlGetGksCi:Invalid Color index=-1073741824
warning:_NhlGetGksCi:Invalid Color index=-1073741824
warning:_NhlGetGksCi:Invalid Color index=-1073741824
warning:_NhlGetGksCi:Invalid Color index=-1073741824
warning:_NhlGetGksCi:Invalid Color index=-1073741824
warning:_NhlGetGksCi:Invalid Color index=-1073741824



To show my question better I wrote a simple test script, which is attached here. It works using named color but fail when RGB array is used for gsnXYBarChartColors. 
Does anyone can tell me how can I use self-defined color (with RGB values) for colors of Bar Chart?



Thanks in advance.


Jie Wu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190825/bc561ac0/attachment.html>


More information about the ncl-talk mailing list