MGHGRCOLORBAR__DEFINE
Class Name
MGHgrColorBar
Purpose
This class implements an object graphics colour bar, ie a rectangular bar
showing a mapping between numeric values and colours.
Superclasses
This class inherits from IDLgrModel.
Properties
The following properties are supported:
AXIS (Get)
This keyword returns a reference to the axis object. It can be
used to modify the axis properties.
BYTE_RANGE (Init,Get,Set)
The range of byte values to which the data range is to be mapped.
COLORSCALE (Init)
A reference to an object from which default colour mapping
information (BYTE_RANGE, DATA_RANGE, LOGARITHMIC and PALETTE) can
be retrieved.
DATA_RANGE (Init,Get,Set)
The range of data values to be mapped onto the indexed color
range. Data values outside the range are mapped to the nearest
end of the range.
LOGARITHMIC (Init,Get,Set)
Set this property for a logarithmic mapping between the data values
and the coloour scale.
DIMENSIONS (Init,Get,Set)
X & Y dimensions of the rectangle in data units.
LOCATION (Init,Get,Set)
Location of the lower left corner of the rectangle in data units.
PALETTE (Init,Get,Set)
A reference to the palette defining the byte-color mapping.
SHOW_AXIS (Init,Get,Set)
This property determines whether & where the axis should be
drawn.
0 - Do not display axis (the default)
1 - Display axis on left side or below the color ramp
(default).
2 - Display axis on right side or above the color ramp I am
not 100% sure this works correctly in all cases.
TICKIN (Init,Get,Set)
Controls whether tick marks are directed inwards (1) or outwards
(0). The default is 0.
TITLE (Init,Get,Set)
A reference to a text object representing the axis title. If
this is specified as a string, then a text object is created
automatically using the current setting of the FONT property.
VERTICAL (Init,Get,Set)
Set this property to 1 for a colour bar with its axis in the Y
direction and 0 for a colour bar with its axis in the X
direction. Default is 0.
XCOORD_CONV (Init,Get,Set)
YCOORD_CONV (Init,Get,Set)
ZCOORD_CONV (Init,Get,Set)
Coordinate transformations specifying the relationship between
normalised & data units.
XRANGE (Get)
YRANGE (Get)
ZRANGE (Get)
Position of the extremes of the object in data units.
Methods
The usual.
###########################################################################
Copyright (c) 1998-2012 NIWA:
http://www.niwa.co.nz/
Licensed under the MIT open source license:
http://www.opensource.org/licenses/mit-license.php
###########################################################################
Modification History
Mark Hadfield, Aug 1998:
Written.
Mark Hadfield, Aug 1999:
Changed the colour ramp from an IDLgrSurface to an
MGHgrColorPlane for better vector output under IDL 5.3.
Mark Hadfield, 2001-07:
Updated for IDL 5.5. With the new DEPTH_OFFSET keyword I was
able to omit some awkward & fragile vertical-positioning code in
the Draw method.
Mark Hadfield, 2011-06:
Cleaned up some ugly code for setting BYTE_RANGE & DATA_RANGE.
Mark Hadfield, 2012-10:
Added LOGARITHMIC property.