Re: Problems with: CALL GSCR

From: Fred Clare (fred@XXXXXX)
Date: Fri Feb 02 1996 - 17:35:51 MST


  With regard to the letter in ncarg-talk:

> 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

  Your problem is not coming from GSCR per se. It is most likely
  coming from where you are displaying your plots. For example, if
  you are displaying your plots in an X11 window, then, in the default
  case, your display is sharing a color map that is being used by all
  windows being displayed. When GSCR tries to assign a color and
  doing so exceeds the number of colors available in the shared color
  map, then GSCR will return an error.

  If you are producing a metafile (either an NCGM or a PostScript file),
  values for 256 distinct colors will be allowed in the file. For example,
  if you take the code that is giving you problems and produce a color
  PostScript file and plot that file on a color PostScript printer you
  will see that you get all of the colors you wanted.

  If you are running version 4.0 of our package, there are some things
  you can do to get what you want. The easiest is to set a value for
  the parameter "PC", using NGSETI, that will flag using a private
  color map (do a "man ngmisc_params" for details on the "PC" parameter).
  What this means is that the window in which you are displaying your
  NCAR Graphics will define its own private color map and allow you to
  use 256 colors as you want. The downside of this is that if you move
  out of the NCAR Grpahics window, most of your colors will flash into
  different colors, since your window has taken over the shared color
  map. Another thing you can do is use the parameter "PE" to relax
  the conditions for matching colors, but you should do this only if
  you do not care if you get the precise colors you define.

  This issue has recently been addressed in yet another way that will
  be made available in 4.0.1. In that release you will have the option
  of specifying whether you want a window to share the color map, to
  use its own private map, or to use a "mixed" map. The mixed map (which
  will be the default) will allow you to define as many colors in a
  given window, using the shared color map, until you need more colors
  than are available, in which case the mode will automatically shift
  to having a private color map for the given window.



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