Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

colorbar.pro


NAME: COLORBAR PURPOSE: The purpose of this routine is to add a color bar to the current graphics window. AUTHOR: FANNING SOFTWARE CONSULTING David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ CATEGORY: Graphics, Widgets. CALLING SEQUENCE: COLORBAR INPUTS: None. KEYWORD PARAMETERS: BOTTOM: The lowest color index of the colors to be loaded in the bar. CHARSIZE: The character size of the color bar annotations. Default is 1.0. COLOR: The color index of the bar outline and characters. Default is !P.Color.. DIVISIONS: The number of divisions to divide the bar into. There will be (divisions + 1) annotations. The default is 6. FONT: Sets the font of the annotation. Hershey: -1, Hardware:0, True-Type: 1. FORMAT: The format of the bar annotations. Default is '(I5)'. INVERTCOLORS: Setting this keyword inverts the colors in the color bar. MAXRANGE: The maximum data value for the bar annotation. Default is NCOLORS. MINRANGE: The minimum data value for the bar annotation. Default is 0. MINOR: The number of minor tick divisions. Default is 2. NCOLORS: This is the number of colors in the color bar. POSITION: A four-element array of normalized coordinates in the same form as the POSITION keyword on a plot. Default is [0.88, 0.10, 0.95, 0.90] for a vertical bar and [0.10, 0.88, 0.90, 0.95] for a horizontal bar. ; RANGE: A two-element vector of the form [min, max]. Provides an alternative way of setting the MINRANGE and MAXRANGE keywords. RIGHT: This puts the labels on the right-hand side of a vertical color bar. It applies only to vertical color bars. TICKNAMES: A string array of names or values for the tick marks. TITLE: This is title for the color bar. The default is to have no title. TOP: This puts the labels on top of the bar rather than under it. The keyword only applies if a horizontal color bar is rendered. VERTICAL: Setting this keyword give a vertical color bar. The default is a horizontal color bar. COMMON BLOCKS: None. SIDE EFFECTS: Color bar is drawn in the current graphics window. RESTRICTIONS: The number of colors available on the display device (not the PostScript device) is used unless the NCOLORS keyword is used. EXAMPLE: To display a horizontal color bar above a contour plot, type: LOADCT, 5, NCOLORS=100 CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $ C_COLORS=INDGEN(25)*4, NLEVELS=25 COLORBAR, NCOLORS=100, POSITION=[0.15, 0.85, 0.95, 0.90] MODIFICATION HISTORY: Written by: David W. Fanning, 10 JUNE 96. 10/27/96: Added the ability to send output to PostScript. DWF 11/4/96: Substantially rewritten to go to screen or PostScript file without having to know much about the PostScript device or even what the current graphics device is. DWF 1/27/97: Added the RIGHT and TOP keywords. Also modified the way the TITLE keyword works. DWF 7/15/97: Fixed a problem some machines have with plots that have no valid data range in them. DWF 12/5/98: Fixed a problem in how the colorbar image is created that seemed to tickle a bug in some versions of IDL. DWF. 1/12/99: Fixed a problem caused by RSI fixing a bug in IDL 5.2. Sigh... DWF. 3/30/99: Modified a few of the defaults. DWF. 3/30/99: Used NORMAL rather than DEVICE coords for positioning bar. DWF. 3/30/99: Added the RANGE keyword. DWF. 3/30/99: Added FONT keyword. DWF 5/6/99: Many modifications to defaults. DWF. 5/6/99: Removed PSCOLOR keyword. DWF. 5/6/99: Improved error handling on position coordinates. DWF. 5/6/99. Added MINOR keyword. DWF. 5/6/99: Set Device, Decomposed=0 if necessary. DWF. 2/9/99: Fixed a problem caused by setting BOTTOM keyword, but not NCOLORS. DWF. 8/17/99. Fixed a problem with ambiguous MIN and MINOR keywords. DWF 8/25/99. I think I *finally* got the BOTTOM/NCOLORS thing sorted out. :-( DWF. 10/10/99. Modified the program so that current plot and map coordinates are saved and restored after the colorbar is drawn. DWF. 3/18/00. Moved a block of code to prevent a problem with color decomposition. DWF. 4/28/00. Made !P.Font default value for FONT keyword. DWF. 9/26/00. Made the code more general for scalable pixel devices. DWF. 1/16/01. Added INVERTCOLORS keyword. DWF. 5/11/04. Added TICKNAME keyword. DWF.

Routines

top source COLORBAR

COLORBAR, BOTTOM=BOTTOM, CHARSIZE=CHARSIZE, COLOR=COLOR, DIVISIONS=DIVISIONS, FORMAT=FORMAT, POSITION=POSITION, MAXRANGE=MAXRANGE, MINRANGE=MINRANGE, NCOLORS=NCOLORS, TITLE=TITLE, VERTICAL=VERTICAL, TOP=TOP, RIGHT=RIGHT, MINOR=MINOR, RANGE=RANGE, FONT=FONT, TICKLEN=TICKLEN, _EXTRA=_EXTRA, INVERTCOLORS=INVERTCOLORS, TICKNAMES=TICKNAMES

Keywords

BOTTOM
CHARSIZE
COLOR
DIVISIONS
FORMAT
POSITION
MAXRANGE
MINRANGE
NCOLORS
TITLE
VERTICAL
TOP
RIGHT
MINOR
RANGE
FONT
TICKLEN
_EXTRA
INVERTCOLORS
TICKNAMES

File attributes

Modification date: Thu Feb 13 16:41:46 2014
Lines: 154