<div>Thanks so much, Rick. <span style="line-height: 1.5;">It works now.</span></div><div><span style="line-height: 1.5;">Cheers</span></div><div><span style="line-height: 1.5;">Jie</span></div><div> </div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Rick Brownrigg"<brownrig@ucar.edu>;</div><div><b>发送时间:</b> 2019年8月25日(星期天) 晚上9:51</div><div><b>收件人:</b> "WUJIE"<393069045@qq.com>;<wbr></div><div><b>抄送:</b> "ncl-talk"<ncl-talk@ucar.edu>;<wbr></div><div><b>主题:</b> Re: [ncl-talk] Problem in controling the colors with RGB array in Bar Chart</div></div><div><br></div><div dir="ltr"><div>Firstly, thank you for the nice clean example that illustrates the problem.</div><div><br></div><div><br></div><div>The named colors are indeed strings and as such should be surrounded by quotes. The RGBa values on the other hand are numerics -- try removing the quotes around the RGB-triplets.</div><div><br></div><div>Hope that helps...</div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 25, 2019 at 4:47 AM WUJIE via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi NCL experts,</div><div><br></div><div>In the NCL Bar Chart, one can easily control the colors of the bar by using Named Color for "gsnXYBarChartColors".</div><div>However, below errors occurs if I use the RGB array for <span style="line-height:16.8px">"gsnXYBarChartColors</span><span style="line-height:16.8px">"</span>:</div><div><br></div><div><div><font color="#0000ff">(0)<span class="gmail-m_2110614914915574452Apple-tab-span" style="white-space:pre-wrap">   </span>convert_color_to_rgba: Error: unknown color type.</font></div><div><font color="#0000ff">(0)<span class="gmail-m_2110614914915574452Apple-tab-span" style="white-space:pre-wrap">      </span>   Returning all missing values.</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div><div><font color="#0000ff">warning:_NhlGetGksCi:Invalid Color index=-1073741824</font></div></div><div><font color="#ff6600"><br></font></div><div>To show my question better I wrote a simple test script, which is attached here. <span style="line-height:1.5">It works using named color but fail when RGB array is used for </span><span style="line-height:16.8px">gsnXYBarChartColors. </span></div><div><span style="line-height:16.8px">Does anyone can tell me how can I use self-defined color (with RGB values) for colors of Bar Chart?</span></div><div><span style="line-height:16.8px"></span></div><div><span style="line-height:16.8px"><br></span></div><div><span style="line-height:16.8px">Thanks in advance.</span></div><div><span style="line-height:16.8px"><br></span></div><div><span style="line-height:16.8px">Jie Wu</span></div><div><font color="#ff6600"><br></font></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div>