Re: b&w eps file coming out reversed?

From: Mary Haley (haley AT XXXXXX)
Date: Fri May 31 2002 - 15:56:08 MDT

  • Next message: Christian Pagé: "gsn_csm_xy doesn't honor linecolor and linethickness resources?"

    >
    > Dear NCL --
    >
    > I am having a problem getting a black-and-white version of a plot -- the
    > eps file generated has a black background, and the page is printed white
    > on black, not black on white. In my ncl script, I simply changed the
    > colormap from "gui_default" to "gsltod". The scipt, and the two
    > versions of the plot can be viewed at /fs/cgd/data0/djnewman/ncl.
    >
    > script is test.ncl
    >
    > with colormap = gui_default
    > --> test_color.eps
    >
    > with colormap = gsltod:
    > --> test_bw.eps
    >
    > Any help on reversing b&w would be greatly appreciated.
    >
    > Thanks,
    > Dave Newman

    Dave,

    As Sylvia pointed out, you have specified a color map that has a black
    background and a white foreground. Even if you are setting the
    background/foreground colors in your .hluresfile (or other resource
    file), anything you set in your NCL script will override the resource
    file values.

    As Sylvia suggested, you can use the "gsdtol" colormap instead, which
    will give you a white background, but it will give you a dark-to-light
    colormap, instead of a light-to-dark colormap.

    If you want to use "gsltod", but force a white background, then do
    something like this:

        gsn_define_colormap(wks,"gsltod")
        cmap = gsn_retrieve_colormap(wks)
        cmap(0,:) = (/1.,1.,1./) ; Set background to white.
    ; cmap(1,:) = (/0.,0.,0./) ; Set foreground to black.
        gsn_define_colormap(wks,cmap)
     
    Note that I commented out the setting of color index 1 to black,
    because I don't know if this is what you want. If you don't do this,
    then the first two colors of your colormap (indices 0 and 1) will be
    white. This is perfectly legal, of course, but might cause problems if
    you are writing text using the foreground color.

    --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 : Fri May 31 2002 - 16:01:04 MDT