Re: color maps

From: Dennis Shea (shea AT cgd.ucar.edu)
Date: Wed Aug 24 2005 - 08:16:34 MDT

  • Next message: Mike Notaro: "MOC"

    >I am trying to use 2 different color tables in a panel plot. Basicaly,
    >I am comparing 2 fields and I want to plot each file and their
    >difference. The difference should have a different color table than the
    >fields themselves.
    >
    >Has anyone ever done that ?
    ==========================================
    yes
    ==========================================

     [1] http://www.ncl.ucar.edu/Applications/panel.shtml
         see Examples 12 and 15
         These examples show two lable bars from the same color map.

     [2] Note that "gsn_panel(wks,...)" uses the color map associated
         associated with 'wks' and only one color map can be associated
         with each workstation. (NCL's graphics use the Graphical Kernal
         System [GKS] and this allows only one colormap/workstation).

     [3] However, there are ways to address the situation.

         (a) you can use a colormap that has many colors
             and explicitly specify
             the colors desired. This still uses one predefined color map.

             http://www.ncl.ucar.edu/Applications/color.shtml
             See Example 7

         (b) you can combine two color maps
             http://www.ncl.ucar.edu/Applications/color.shtml
             See Example 9

             Then you can use the gsn resources to
             specify the range of colors.
             specific to each original color map. Let's say the combined
             color map has colors 2 to 15 from the 1st colormap and 16 to 80
             are from the 2nd color map. Both are available to the wks.

             The resources are:
                 res@gsnSpreadColors = True ; use full color map
                 res@gsnSpreadColorStart = 3 ; start at 3
                 res@gsnSpreadColorEnd = 15 ; end at 15
                    :
                    :
                 plot(n) = ...

                 res@gsnSpreadColorStart = 16
                 res@gsnSpreadColorEnd = 79
                 plot(n) = ...

     Cheers
     D

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



    This archive was generated by hypermail 2b29 : Wed Aug 24 2005 - 08:57:26 MDT