The IDLgrLegend object provides a simple interface for displaying a legend. The legend itself consists of a (filled and/or framed) box around one or more legend items (arranged in a single column) and an optional title string. Each legend item consists of a glyph patch positioned to the left of a text string. The glyph patch is drawn in a square which is a fraction of the legend label font height. The glyph itself can be in one of two types (see the TYPE keyword). In line type, the glyph is a line segment with linestyle, thickness and color attributes and an optional symbol object drawn over it. In fill type, the glyph is a square patch drawn with color and optional pattern object attributes.
An IDLgrLegend 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
subdirectory of the IDL distribution.
This class is a subclass of IDLgrModel
The IDLgrLegend:: Cleanup procedure method performs all cleanup on the object. IDLgrLegend 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 IDLgrLegend:: ComputeDimensions function method retrieves the dimensions of a legend object for the given destination object. The result is a three-element floating-point vector [ xDim , yDim , zDim ] representing the dimensions of the legend object measured in data units. IDLgrLegend is described above.
The IDLgrLegend:: GetProperty procedure method retrieves the value of a property or group of properties for the legend. IDLgrLegend is described above.
Any keyword to IDLgrLegend::Init
The IDLgrLegend:: Init function method initializes the legend object. IDLgrLegend 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.
An array of strings to be used as the displayed item label. The length of this array is used to determine the number of items to be displayed. Each item is defined by taking one element from the ITEM_NAME, ITEM_TYPE, ITEM_LINESTYLE, ITEM_THICK, ITEM_COLOR, and ITEM_OBJECT vectors. If the number of items (as defined by the ITEM_NAME array) exceeds any of the attribute vectors, the attribute defaults will be used for any additional items.
Properties retrievable via IDLgrLegend::GetProperty
Set this keyword to a floating-point value to indicate the amount of blank space to be placed around the outside of the glyphs and text items. The units for this property are fractions of the legend label font height. The default is 0.1 (10% of the label font height).
Set this keyword to a floating-point value to indicate the amount of blank space to be placed vertically between each legend item. The units for this keyword are fractions of the legend label font height. The default is 0.1 (10% of the label font height). The same gap is placed horizontally between the legend glyph and the legend text string.
Set this keyword to an array of colors defining the color of each item. The array defines M different colors, and should be either of the form [3, M ] or [ M ]. In the first case, the three values are used as an RGB triplet, in the second case, the single value is used as a color index value. The default color is [0,0,0].
Set this keyword to an array of integers defining the style of the line to be drawn if the TYPE property is set to zero. The array can be of the form [ M ] or [2, M ]. The first form selects the linestyle for each legend item from the predefined defaults:
Set this keyword to an array of object references of type IDLgrSymbol or IDLgrPattern. A symbol object is drawn only if the TYPE property is set to zero. A pattern object is used when drawing the color patch if the TYPE property is set to one. The default object is the NULL object.
Set this keyword to an instance of the IDLgrText object class to specify the title for the legend. The default is the null object, specifying that no title is drawn. The title will be centered at the top of the legend, even if the text object itself has an associated location.
The IDLgrLegend:: SetProperty procedure method sets the value of a property or group of properties for the legend. IDLgrLegend is described above.
Any keyword to IDLgrLegend::Init