Re: errors in panelled bar plots

From: Mary Haley (haley AT XXXXXX)
Date: Tue Mar 02 2004 - 07:38:25 MST

  • Next message: Andres Roubicek: "contours, vectors and topography on one plot"

    > I have recently discovered a problem with color usage
    > in a multi-panel figure of bar plots. The output and
    > related files are attached. If you look at the ps
    > file, you'll see that the rightmost 2 or 3 (of 7) bars
    > in each plot are not always the same color. The left
    > side ones seem to be ok. I've experimented a little
    > with the color set but didn't have time to draw any
    > definitive conclusions.
    >
    > This was originally run on a Mac with OS 10.2 and ncl
    > a031. I just upgraded to 10.3 and the problem remains.
    > I can fairly easily try it on a Sun, too, if that would
    > help debug.
    >
    > I used this figure in a talk last week but had to go
    > through fixing the bars in Illustrator first -- not
    > something I want to make a habit of!
    >
    > thanks,
    > dave
    >

    Hi Dave,

    What's going on is that one set of colors are being used for the bars
    above the reference line, and the same set of colors are being used
    for the colors below the reference line. You'll notice that the colors
    start with firebrick, red, orange, green navy, and blue. So, the first
    bar above the reference line will be firebrick, and ditto for the first
    bar below the reference line, and so on.

    To get around this, you can use the resource,
    "gsnXYBarChartColors2". Just use it in place of
    "gsnXYBarChartColors". It essentially tells NCL to use one set of
    colors for all the bars, regardless of whether they fall above or
    below the reference line. For a description of this resource, see
    example 6 at:

        http://www.cgd.ucar.edu/csm/support/CSM_Graphics/bar.shtml

    This resource was added in the latest version of NCL, so you'll need
    to download this before it will work, or else I can get you a new copy
    of gsn_code.ncl/gsn_csm.ncl with this resource.

    --Mary

    _______________________________________________
    ncl-talk mailing list
    ncl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Tue Mar 02 2004 - 07:41:16 MST