Re: Problems with: CALL GSCR

From: Jeff W. Boote (boote AT unknown)
Date: Wed Feb 07 1996 - 22:02:28 MST


> Hi,
> I keep running into problems when I try to set up
> a color bar using the
> CALL GSCR
> subroutine
>
> Alot of my work involves using 8 bit sattelite data which typically
> has values ranging in scale from [0-255].
> There are alot of standard COLOR BARS out there that use these 256
> parameter range. An example is the color bar used to plot the
> chlorophyll derived from the NASA Coastal Zone Ocean Color Scanner.
> My problem is that I can't get the GSCR to let me have more than
> about 217 different values.
> How can I increase the number of colors in the color bar?
>
> John R. Moisan

I'm going to assume you are using the X driver of NCAR GKS, since you say
you have the problem with GSCR, and not while displaying a metafile.

If you are using the X driver, then the answer is that you need to tell the
X driver to use a private X colormap in order to get 256 distinct colors.
This is because all the applications you are currently running are allocating
colors from the shared colormap, so it isn't possible for the ncar graphics
window to get that many if it is using the shared colormap as well.
If you are using version 4.0, then the X driver will try and use the
closest color that has already been allocated if you don't use the private
colormap.

You can tell the X driver of NCAR GKS to use a private colormap by using
escape number -1401. There is documentation on this at
http://ngwww.ucar.edu/ngdoc/ng4.0/gks/escape.html. The easiest way
to use this escape is by using the 'PR' parameter to ngmisc. You can
find documentation on this with "man ngmisc_params".

jeff

-- 
Jeff W. Boote  <boote AT unknown>          ***************************************
Scientific Computing Division            * There are more things in heaven and *
National Center for Atmospheric Research * earth, Horatio, Than are dreamt of  *
Boulder                                  * in your philosophy.          Hamlet *
                                         ***************************************



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:44:54 MDT