switching color maps in multi-panel plots

From: Paul Nutter (pnutter AT XXXXXX)
Date: Tue Jun 03 2003 - 12:58:27 MDT


I'm trying to draw a two-panel plot where each panel has a different
color map. I've defined one workstation, then switch color map
definitions when building each plot to the same workstation. It appears
that only portions of the colormaps are replaced, and gsnSpreadColors
fails to function properly. Relevent portions of my code follow... Any

Paul Nutter


   gsn_define_colormap (xwks,"ncview_default")
   getvalues xwks
     "wkColorMap" : cmap1
   end getvalues
   cmap1(0,:) = (/1.,1.,1./)
   cmap1(1,:) = (/0.,0.,0./)

   gsn_define_colormap (xwks,"rainbow")
   getvalues xwks
     "wkColorMap" : cmap2
   end getvalues
   cmap2(0,:) = (/1.,1.,1./)
   cmap2(1,:) = (/0.,0.,0./)
   cmap2(2,:) = (/1.,1.,1./)

   twopanel = new(2,graphic)


   twopanel(0) = gsn_csm_contour_map_ce(xwks,VORT,rsrc1)


   twopanel(1) = gsn_csm_contour_map_ce(xwks,TPCP,rsrc4)

   gsn_panel(xwks,twopanel,(/2,1/),False) ; Draw as one plot

ncl-talk mailing list
ncl-talk AT ucar.edu

This archive was generated by hypermail 2b29 : Tue Jun 03 2003 - 13:38:52 MDT