SNOECT
Name
SNOECT
Purpose
This procedure loads the SNOE color table. It allows different
variants of the color table based upon keywords, and optionally
saves the current (about-to-be-destroyed) table.
Category
SNOE, color, image
Calling Sequence
SNOECT ; no *required* args (but plenty o' options)
Inputs
none
Keyword Parameters
GRAY: Set this keyword to have a gray pixel at index 254
GVAL: Set this to the value of the gray pixel [ default: 120 ]
BW: Set this keword to swap the Black and White (Top and
Bottom, Foreground and Backround)
DISPLAY: Set this keyword to have the SNOE color table loaded and
displayed on screen with a color bar and plots of the RGB
vectors.
Optional Outputs
R: The current Red channel vector
G: The current Green channel vector
B: The current Blue channel vector
Side Effects
The current color table is changed to the SNOE color table.
Restrictions
You must be able to access the display to call this procedure
Procedure
Generate R,G,B vectors for an 8-bit colortable. Vectors should be
0 to 255 in length (2^8 = 256). Index 0 should be [0,0,0] which is
black (background). Index 255 is [255,255,255] which is white
(foreground) color. Indices between 1 and 254 are the color table
itself, with the top 2 indices here (253 and 254) repeated as the
same color. This allows the user to optionally change 254 to any
shade of gray.
Example
SNOECT ; load the default SNOE color table
SNOECT, oldR, oldG, oldB, /gray ; load with gray, save old ct
SNOECT, /bw ; use for a white background, black text
SNOECT, /display ; What is the SNOE ct?
;;; This is an example how to use gray in you plots
;;; I use it to add a subtle grid behind the data
SNOECT, /gray
data = indgen(11)
plot, data, color=254, xticklen=1, yticklen=1
plot, data, /noerase
Modification History
Written by: Ken Mankoff
05/21/2002; KDM; Added rr,gg,bb, vectors to save current CT. Added
/gray, gval, and /bw keywords. Added documentation.