The IDLgrColorbar object consists of a color-ramp with an optional framing box and annotation axis. The object can be horizontal or vertical.
An IDLgrColorbar object is an atomic graphic object ; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.
This object class is implemented in the IDL language. Its source code can be found in the file
idlgrcolorbar.pro
in the
lib
subdirectory of the IDL distribution.
This class is a subclass of IDLgrModel
The IDLgrColorbar:: Cleanup procedure method performs all cleanup on the object. IDLgrColorbar is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrColorbar:: ComputeDimensions function method retrieves the dimensions of a colorbar object for the given destination object. The result is a three-element floating-point vector [ xDim , yDim , zDim ] representing the dimensions of the colorbar object measured in data units. IDLgrColorbar is described above.
The IDLgrColorbar:: GetProperty procedure method retrieves the value of a property or group of properties for the colorbar. IDLgrColorbar is described above.
Any keyword to IDLgrColorbar::Init
Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the retrievable properties associated with this object.
Set this keyword to a named variable that will contain an object reference to the object that contains this colorbar.
Set this keyword to a named variable that will contain a two-element vector of the form [ xmin , xmax ] specifying the range of the x data coordinates covered by the colorbar.
Set this keyword to a named variable that will contain a two-element vector of the form [ ymin , ymax ] specifying the range of the Y data coordinates covered by the colorbar.
The IDLgrColorbar:: Init function method initializes the colorbar object. IDLgrColorbar is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Obj = OBJ_NEW('IDLgrColorbar')
Result =
Obj
->
[IDLgrColorbar::]
Init(
[aRed, aGreen, aBlue]
)
(
In a subclass' Init method only
.)
A vector containing the red values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aRed vector must not exceed 256.
A vector containing the green values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aGreen vector must not exceed 256.
A vector containing the blue values for the color palette. These values should be within the range of 0 < Value < 255. The number of elements comprising the aBlue vector must not exceed 256.
If aRed , aGreen , and aBlue are not provided, the color palette will default to a 256 entry greyscale ramp.
Properties retrievable via IDLgrColorbar::GetProperty
A vector containing the blue values for the color palette. Setting this value is the same as specifying the aBlue argument to the IDLgrColorbar::Init method.
Set this keyword to the color to be used as the foreground color for the axis and outline box. The color may be specified as a color lookup table index or as an RGB vector. The default is [0, 0, 0].
Set this keyword to a two element vector [ dx , dy ] that specifies the size of the ramp display (not the axis) in units. If dx > dy , the colorbar is drawn horizontally with the axis placed below or above the ramp box depending on the value of the SHOW_AXIS property. If dx < dy , the colorbar is drawn vertically with the axis placed to the right or left of the ramp box depending on the value of the SHOW_AXIS property. The default value is [16,256].
A vector containing the green values for the color palette. Setting this value is the same as specifying the aGreen argument to the IDLgrColorbar::Init method.
Set this keyword to a boolean value to indicate whether this object should be drawn:
Set this keyword to an integer representing the number of major tick marks. The default is -1, specifying that IDL will compute the number of tickmarks. Setting MAJOR equal to zero suppresses major tickmarks entirely.
Set this keyword to an integer representing the number of minor tick marks. The default is -1, specifying that IDL will compute the number of tickmarks. Setting MINOR equal to zero suppresses minor tickmarks entirely.
Set this keyword to a string representing the name to be associated with this object. The default is the null string, ''.
A vector containing the red values for the color palette. Setting this value is the same as specifying the aRed argument to the IDLgrColorbar::Init method.
Set this keyword to an integer value indicating whether the axis should be drawn:
Set this keyword to a boolean value indicating whether the colorbar bounds should be outlined:
Set this keyword to a scale ratio specifying the length of minor tick marks relative to the length of major tick marks. The default is 0.5, specifying that the minor tick mark is one-half the length of the major tick mark.
Set this keyword to an integer value between 1 and 10, specifying the line thickness used to draw the axis and box outline, in pixels. The default is one pixel.
Set this keyword to either a standard IDL format string (see chapter 11 of Building IDL Applications for details on format codes) or a string containing the name of a user-supplied function that returns a string to be used to format the axis tick mark labels. The function should accept integer arguments for the direction of the axis, the index of the tick mark, and the value of the tick mark, and should return a string to be used as the tick mark's label. The function may optionally accept a keyword called DATA, which will be automatically set to the TICKFRMTDATA value. The default TICKFORMAT is '', the null string, which indicates that IDL will determine the appropriate format for each value.
Set this keyword to a value of any type. It will be passed via the DATA keyword to the user-supplied formatting function specified via the TICKFORMAT keyword, if any. By default, this value is 0, indicating that the DATA keyword will not be set (and furthermore, need not be supported by the user-supplied function). Note that TICKFRMTDATA will not be included in the structure returned via the ALL keyword to the IDLgrColorbar::GetProperty method.
Set this keyword to the length of each major tick mark, measured in dimension units. The default, tick mark length is 8.
Set this keyword to either a single instance of the IDLgrText object class (with multiple strings) or to a vector of instances of the IDLgrText object class (each with a single string) to specify the annotations to be assigned to the tick marks. By default, TICKTEXT is set to the NULL object, which indicates that IDL will compute tick annotations based upon the major tick values. The positions and orientation of the provided text object(s) may be overwritten by the colorbar.
Set this keyword to a vector of data values representing the values at each tick mark. If TICKVALUES set to 0, the default, IDL computes the tick values based on the number of elements in the RED_VALUES property and the number of major ticks.
Set this keyword to an instance of the IDLgrText object class to specify the title for the axis. The default is the null object, specifying that no title is drawn. The title will be centered along the axis, even if the text object itself has an associated location.
Set this keyword to a value of any type. You may use this value to contain any information you wish.
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized X = s 0 + s 1 * Data X
Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:
Normalized Y = s 0 + s 1 * Data Y
The IDLgrColorbar:: SetProperty procedure method sets the value of a property or group of properties for the colorbar. IDLgrColorbar is described above.
Any keyword to IDLgrColorbar::Init