Re: cyclic colormap

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 May 2009 09:38:29 -0600 (MDT)

Hi Bruce,

The "cyclic" color map does have a black background and a white
foreground. Actually, I think it doesn't explicitly set the
background/foreground colors; it uses the internal NCL default, which
is a black background, white foreground.

I think what is happening in your case is that you probably have a
".hluresfile" file in your home directory that is swapping the
foreground/background colors with:

! White background/black foreground
*wkForegroundColor : (/0.,0.,0./)
*wkBackgroundColor : (/1.,1.,1./)

These resources are explicitly defining the background and foreground
colors to white and black respectively.

If you have a .hluresfile that sets the above and you want to keep
the black background, then see this sample script:

load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"

   cdf_file = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/contour.cdf","r")
   temp = cdf_file->T(0,0,:,:)

   wks = gsn_open_wks("x11","test")

; Force a black background, white foreground, to override
; setting in ".hluresfile".
   setvalues wks
     "wkForegroundColor" : (/1.,1.,1./) ; white
     "wkBackgroundColor" : (/0.,0.,0./) ; black
   end setvalues

   res = True
   res_at_cnFillOn = True
   plot = gsn_contour(wks,temp,res)

On Tue, 26 May 2009, Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:

> Hello,
> A small issue: The "cyclic" colormap defines
> white to have index 0 and black to have
> index 1.
> The web page has the opposite (black=1 and
> white=0). See
> Thanks, Bruce
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue May 26 2009 - 09:38:29 MDT

This archive was generated by hypermail 2.2.0 : Tue May 26 2009 - 10:17:16 MDT