[ncl-talk] gsnXYBarChartColors2 and custom colormap

Jared Lee jaredlee at ucar.edu
Thu Jan 12 14:26:33 MST 2017


Hi, I have a script that generates some histograms, and also calculates the
difference between those histograms and plots the difference as a bar
chart. I have a custom colormap of RGB triplets (dimensions 256 x 3) that I
use for the histogram (via gen_define_colormap), and if possible, I'd like
to use the same color scheme for the bar chart of the histogram differences.

When I try to set the resource gsnXYBarChartColors2 to this RGB triplet
colormap, however, I get the following error:

(0) gsn_csm_xy: Fatal: The resource for specifying bar colors must either
be 1D, or 2D where the first dimension is equal to the number of Y
reference lines or curves.
(0) Will not fill your bar chart.

Is there a way around this? If not, I can settle for just coloring
above/below the reference line red/blue (via gsnAboveYRefLineColor and
gsnBelowYRefLineColor), even though it's not my preferred option.

Jared

-- 
===============================
Jared A. Lee, Ph.D.
Project Scientist I
Research Applications Laboratory
National Center for Atmospheric Research
Boulder, Colorado, USA

Email: jaredlee at ucar.edu (w)
Phone: 303.497.8485 (w)
Web: https://staff.ucar.edu/users/jaredlee
===============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170112/f49f3f6f/attachment.html 


More information about the ncl-talk mailing list