Legend class resource descriptions

lgLegendOn
A boolean flag that determines whether the Legend should appear.

This resource may be intercepted or disabled by:

Default: True

lgOrientation
This resource of type NhlTOrientation specifies whether the legend items are arranged horizontally in a row or vertically in a column. The major axis of the Legend instance is parallel to the orientation and the minor axis is perpendicular to the orientation.

Default: Vertical

lgJustification
When the Legend changes size the justification determines a fixed point about which the size change occurs. Any of the corners, the center of any edge, or the current center of the Legend may be set to be the fixed justification point.

This resource may be intercepted or disabled by:

Default: BottomLeft

lgBoxMajorExtentF
Determines the amount of the area allotted to the boxes surrounding each item of the Legend in the direction of lgOrientation is actually occupied by the box. This will be visible only when the boxes outlining the space occupied by each item are turned on. When set to 1.0 the boxes touch each other. If set to 0.0 the boxes disappear entirely. Intermediate values create discreet separated boxes. The items themselves are not affected by the value given to lgBoxMajorExtentF.

Default: 0.5

lgBoxMinorExtentF
When the lgAutoManage feature is turned on, this resource determines the fraction of the distance (less the margins) across the axis perpendicular to the orientation (the minor axis) occupied by the boxes surrounding the each item of the Legend. If set to 1.0, the explanatory labels are completely eliminated from the Legend area. If the title also extends along the minor axis, the lgBoxMinorExtentF cannot exceed 1.0 minus the amount of space requested by the title, as set by the resource lgMaxTitleExtentF. The value of the lgBoxMinorExtentF controls how long a line segment is when the item type is set to Lines, but it does not clip or affect the appearance of item type Markers in any way.

When lbAutoManage is False and lgTitlePosition is set to a side perpendicular to the major axis, the axis extent from which the box minor extent is calculated includes any extra extent added due to an increased value given to lgTitleFontHeightF. However, it does not include extra extent due to increased value given to the lgLabelFontHeightF resource.

Default: 0.6

lgItemCount
Number of items in the Legend. All the Legend array resources, when specified, are required to have at least as many elements as lgItemCount.

This resource may be intercepted or disabled by:

Default: 16

lgItemPlacement
When set to UniformPlacement all Legend items are evenly spaced within the Legend. If set to ExplicitPlacement, the distance between each item is controlled by the lgItemPositions array.

Default: UniformPlacement

lgBoxBackground
The color index used for the background of the boxes enclosing the Legend items. By default it is set to -1 (Transparent), specifying that the background of the boxes is transparent to whatever it overlays.

Default:Transparent

lgAutoManage
The lgAutoManage switch determines how Legend operates. When it is on, Legend manages the sizing of the title and the label text. The title is always sized to fit within the currently set boundaries of the Legend given any text angle, aspect ratio, etc. The labels also are sized to fit within the current boundary, with the exception that when the text of the labels is rotated, the Legend as a whole may grow along the axis of orientation. Additionally the sizing of the labels is managed so that under any rotation, the labels will not overlap. Also the label justification is managed such that, given any rotation the end of the label string aligns with the correct Legend item. When off, you may directly size the labels and text as you please. However, under rotation, the justification of the labels does not change, and, although the text is moved out of the way of the Legend boxes, it will not necessarily line up correctly. In practice, when working interactively, a good method is to create a basic Legend layout close to the desired size with the lgAutoManage mode on, then switch it off to tune the text size precisely to your taste.

Default: True

lgLabelOffsetF
Defines an offset, specified as a fraction of the length of the minor Legend axis (perpendicular to the axis of orientation), between the Legend boxes and the labels. The offset may be positive or negative and the offset direction depends on the current value of lgLabelJust. The positive direction is from the justified edge toward the body of the text (i.e. positive for right-justified text is toward the left). The primary use of negative offsets for labels is when the label alignment is set either to AboveBoxes or BelowBoxes. In these cases, you may begin or end the text at some point under or over the Legend items, thus allowing for more text within a narrower Legend. If the label alignment is set to BoxCenters, negative offsets may result in text appearing overlaid on the actual Legend items. When positive the label offset quantity is subtracted from the amount allotted to the labels as a whole.

Default: 0.02

lgTitleOffsetF
This resource defines an offset specified as a fraction of the length of the axis (minus the margins) perpendicular to the side specified by lgTitlePosition. This offset separates the title extent, as specified by lgTitleExtentF, from the other elements of the Legend.

Default: 0.03

lgLeftMarginF
Defines an offset, specified as a fraction of whichever Legend axis is smallest, between the leftmost Legend element and the left edge of the Legend perimeter. It is always subtracted from the current Legend extent.

Default: 0.05

lgRightMarginF
Defines an offset, specified as a fraction of whichever Legend axis is smallest, between the rightmost Legend element and the right edge of the Legend perimeter. It is always subtracted from the current Legend extent.

Default: 0.05

lgBottomMarginF
Defines an offset, specified as a fraction of whichever Legend axis is smallest, between the rightmost Legend element and the right edge of the Legend perimeter. It is always subtracted from the current Legend extent.

Default: 0.05

lgTopMarginF
Defines an offset, specified as a fraction of whichever Legend axis is smallest, between the rightmost Legend element and the right edge of the Legend perimeter. It is always subtracted from the current Legend extent.

Default: 0.05

lgMonoItemType
When set True, the scalar resource lgItemType sets all items in the legend to the same NhlTMarkLineMode. This indicates if the item should contain a line, a marker, or both. Otherwise, the array resource lgItemTypes controls each legend item individually.

This resource may be intercepted or disabled by:

Default: True

lgItemType
When lgMonoItemType is set True, this resource sets all the items in the legend. It indicates if they should contain a line, a marker, or both.

This resource may be intercepted or disabled by:

Default: Lines

lgItemTypes
When lgMonoItemType is set False, this array sets an NhlTMarkLineMode value for each Legend item individually. This means that each item in the Legend can have a line, a marker, or both based on the value of each element of this array.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoDashIndex
When set True, the scalar resource lgDashIndex sets the dash pattern index for all lines drawn in items in the legend to a single index value. Otherwise, the array resource lgDashIndexes controls the dash index of each legend item individually.

This resource may be intercepted or disabled by:

Default: False

lgDashIndex
When lgMonoDashIndex is set True, this resource sets a uniform dash pattern index for the lines drawn in all items in the legend.

This resource may be intercepted or disabled by:

Default: SolidLine

lgDashIndexes
When lgMonoDashIndex is set False, this array sets a dash pattern index value for each Legend item individually. If a positive index greater than the number of dash patterns is specified, the dash pattern routines automatically use modular arithmetic to arrive at an index value within the defined range of indexes.

This resource may be intercepted or disabled by:

Default: Array elements 0 through the item count - 1 are assigned indexes 1 through item count.

lgMonoMarkerIndex
When set True, the scalar resource lgMarkerIndex sets the marker index for all lines drawn in items in the legend to a single index value. Otherwise, the array resource lgMarkerIndexes controls the marker index of each legend item individually.

This resource may be intercepted or disabled by:

Default: False

lgMarkerIndex
When lgMonoMarkerIndex is set True, this resource sets a uniform marker for all items in the legend.

This resource may be intercepted or disabled by:

Default:

lgMarkerIndexes
When lgMonoMarkerIndex is set False, this array sets a marker index value for each Legend item individually. If a positive index greater than the number of markers is specified, the marker routines automatically use modular arithmetic to arrive at an index value within the defined range of indexes.

This resource may be intercepted or disabled by:

Default: Array elements 0 through the item count - 1 are assigned indexes 1 through item count.

lgLineLabelStrings
An array of strings. Each string determines the contents of the label used in the rendering of the line specified by the corresponding element in the lgDashIndexes resource, if the corresponding element in the lgItemTypes resource indicates "Lines". To have an item line without a line label, specify that element with NULL using the C interface, or an empty string ("") from FORTRAN or NCL.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoLineColor
When set True, all item lines in the Legend are set to a single color, as specified by the value of the scalar resource lgLineColor. Otherwise, the array resource lgLineColors controls the color of each item line individually.

This resource may be intercepted or disabled by:

Default: False

lgLineColor
When lgMonoLineColor is True, this resource of type NhlTColorIndex sets the color of each Legend item line to a single value. Note that color of the line labels are controlled by a different set of resources.

This resource may be intercepted or disabled by:

Default: Foreground

lgLineColors
When lgMonoLineColor is False, this resource of type NhlTColorIndexGenArray individually sets the color assigned to each Legend item line. Note that color of the line labels are controlled by a different set of resources.

This resource may be intercepted or disabled by:

Default: By default each item line is assigned to the next succeeding color in the hlu colortable, up to the number of defined colors. Additional boxes are assigned the value, "Foreground" (1).

lgMonoMarkerColor
When set True, all items markers in the Legend are set to a single color, as specified by the value of the scalar resource lgMarkerColor. Otherwise, the array resource lgMarkerColors controls the color of each item marker individually.

This resource may be intercepted or disabled by:

Default: False

lgMarkerColor
When lgMonoMarkerColor is True, this resource of type NhlTColorIndex sets the color of each Legend item marker to a single value.

This resource may be intercepted or disabled by:

Default: Foreground

lgMarkerColors
When lgMonoMarkerColor is False, this resource of type NhlTColorIndexGenArray individually sets the color assigned to each Legend item marker.

This resource may be intercepted or disabled by:

Default: By default each item marker is assigned to the next succeeding color in the hlu colortable, up to the number of defined colors. Additional boxes are assigned the value, "Foreground" (1).

lgMonoLineDashSegLen
When set True, a single line segment length is used for all item lines int the Legend object, as specified by the scalar resource lgLineDashSegLenF. Otherwise the array element of lgLineDashSegLens controls the segment length of each individual Legend item line.

This resource may be intercepted or disabled by:

Default: True

lgLineDashSegLenF
The length in NDC units of the dash pattern used for Legend line items. This is the length before the dash pattern repeats.

This resource may be intercepted or disabled by:

Default: 0.15

lgLineDashSegLens
When lgMonoLineDashSegLen is False, this array resource individually controls the segment length value applied to the each Legend item line.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoLineThickness
When set True, a single line thickness is used for all item lines in the Legend object, as specified by the scalar resource lgLineThicknessF. Otherwise the array element of lgLineThicknesses controls the thickness of each individual Legend item line.

This resource may be intercepted or disabled by:

Default: True

lgLineThicknessF
When lgMonoLineThickness is True, this resource sets a singles thickness value for all Legend item lines. It does not affect the thickness of lines used to draw the line labels in the line items.

This resource may be intercepted or disabled by:

Default: 1.0

lgLineThicknesses
When lgMonoLineThickness is False, this array resource individually controls the thickness value applied to the each Legend item line. The thickness of the characters in the line labels are not affected.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoMarkerThickness
When set True, a single thickness is used for all item markerss in the Legend object, as specified by the scalar resource lgMarkerThicknessF. Otherwise the array elements of lgMarkerThicknesses controls the thickness of each individual Legend marker.

This resource may be intercepted or disabled by:

Default: True

lgMarkerThicknessF
When lgMonoMarkerThickness is True, this resource sets a singles thickness value for all Legend markers. This value affects the thickness of the lines in the glyphs used to represent the markers.

This resource may be intercepted or disabled by:

Default:

lgMarkerThicknesses
When lgMonoMarkerThickness is False, this array resource individually controls the thickness value applied to the each Legend marker. The value affects the thickness of the lines in the glyphs used to represent the markers.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoLineLabelFontHeight
When set True, the font height of all line labels of line type items are set to a single size, as specified by the scalar resource lgLineLabelFontHeightF. Otherwise, the font height is individually controlled by the array resource lgLineLabelFontHeights.

This resource may be intercepted or disabled by:

Default: True

lgLineLabelFontHeightF
When lgMonoLineLabelFontHeight is True, this resource sets the height in NDC units of all the internal line labels used for line type items. Note that unlike many other text font height type resources, the values of this resource does not automatically scale when the size of the Legend is changed. This is because the size may be of significance in distinguishing the items for which the Legend serves as the key. Also, note that setting lgAutoManage True does not disable lgLineLabelFontHeightF. The Legend object currently does nothing to prevent the internal line labels from overlapping other Legend items, when the value of this resource is large enough.

This resource may be intercepted or disabled by:

Default: 0.01

lgLineLabelFontHeights
When lgMonoLineLabelFontHeight is False, the elements of this array individually specify the height in NDC units of the internal line labels used with line type items. Note that unlike many other text font height type resources, the values of this resource does not automatically scale when the size of the Legend is changed. This is because the size may be of significance in distinguishing the items for which the Legend serves as the key. Also, note that setting lgAutoManage True does not disable lgLineLabelFontHeights. The Legend object currently does nothing to prevent the internal line labels from overlapping other Legend items, when the value of this resource is large enough.

This resource may be intercepted or disabled by:

Default: NULL

lgMonoMarkerSize
When set True, the size of all marker type items is set to a single size, as specified by the scalar resource lgMarkerSizeF. Otherwise, the size is individually controlled by the array resource lgMarkerSizes.

This resource may be intercepted or disabled by:

Default: True

lgMarkerSizeF
When lgMonoMarkerSize is True, this resource sets the height in NDC units of all marker items.

This resource may be intercepted or disabled by:

Default: 0.01

lgMarkerSizes
When lgMonoMarkerSize is False, the elements of this array individually specify the height in NDC units of marker items.

This resource may be intercepted or disabled by:

Default: NULL

lgLabelStrings
An array containing the strings that comprise the label associated with each item of the Legend.

This resource may be intercepted or disabled by:

Default: Label_<label element number>
lgItemPositions
When lgItemPlacement is set to ExplicitPlacement, the elements of this array control the relative position within the Legend of each item. The array should be a monotonically increasing sequence in the range 0.0 - 1.0 inclusive (except as noted below). Each element corresponds to the position of the Legend item with the corresponding index. The value indicates the distance of each particular item from the left or bottom (depending on the value of lgOrientation) of the Legend item area. A value of 1.0 indicates the right or top of the item area, while 0.5 would indicate the center of the item area. You can cause a subgroup of the items to be evenly spaced by giving the value -1.0 to the elements between two elements containing valid monotonically increasing values. The Legend object will replace the -1.0 values with monotonically increasing values evenly spaced between the two given valid values. Actually it will replace any invalid values in the same manner, although values other than -1.0 will cause a WARNING error.

Default: NULL

lgMonoLineLabelFontColor
When set True, all internal line labels have the same color, as specified by the scalar resource lgLineLabelFontColor. Otherwise, the colors of the line labels are controlled individually based on the elements of the array resource lgLineLabelFontColors.

This resource may be intercepted or disabled by:

Default: False

lgLineLabelFontColor
When lgMonoLineLabelFontColor is True, this resource of type NhlTColorIndex sets the color of all line labels used in line type items to a single value.

This resource may be intercepted or disabled by:

Default:

lgLineLabelFontColors
When lgMonoLineLabelFontColor is False, this resource of type NhlTColorIndexGenArray individually sets the color index used to render the line label for each line type Legend item.

This resource may be intercepted or disabled by:

Default: NULL

lgLineLabelsOn
A boolean flag determining whether to draw line labels in line type Legend items.

Default: True

lgLineLabelFont
This resource of type NhlTFont specifies the font used to render the Legend line labels.

Default: "pwritx"

lgLineLabelFontAspectF
Determines the shape of the internal line label font text. Values greater than 1.0 make the text tall and skinny. Values less than one make the text short and wide.

This resource may be intercepted or disabled by:

Default: 1.0

lgLineLabelFontThicknessF
Determines the thickness of the line used to draw the internal line label text. This resource only affects the Hershey fonts.

This resource may be intercepted or disabled by:

Default: 1.0

lgLineLabelFontQuality
Determines the text quality used to draw the line label text.

This resource may be intercepted or disabled by:

Default: High

lgLineLabelConstantSpacingF
Determines a constant amount of extra space that is placed between each character of the line label text. Values less than 0.0 result in an error and are replaced with the default value.

This resource may be intercepted or disabled by:

Default: 0.0

lgLineLabelFuncCode
Determines the function code character used when parsing the line label string.

This resource may be intercepted or disabled by:

Default: :

lgLabelsOn
A boolean flag determining whether labels should appear in the Legend.

Default: True

lgLabelPosition
This resource of type NhlTPosition determines the position of the labels with respect to the Legend boxes. If the orientation of the Legend is Horizontal, valid values are Top, Center, and Bottom. If the orientation is Vertical, valid values are Left, Center, and Right. If a value inappropriate for the orientation is assigned, the value is silently converted as follows: Bottom becomes Left, Top becomes Right, and vice versa. When set to Center the labels are centered on, and when the auto-manage feature is on, sized to fit in the same space as each Legend item. To avoid overlap, the lgLabelAlignment resource must be set properly when the label position is Center.

Default: Right

lgLabelAngleF
The angle of the text of the labels. When the auto-manage resource is turned on, both the size and justification mode of the label text may change in response to changes of the label angle.

Default: 0.0

lgLabelAlignment
How the labels align with respect their corresponding items along the minor axis of the Legend object. When set to ItemCenters, the labels align with the centers of each item. If set to AboveItems, the labels appear above the item, while if set to BelowItems, the labels appear below the item. To avoid overlap use alignment modes of above or below when the label offset is negative or the label position is set to Center.

Default: ItemCenters

lgLabelDirection
This resource of type NhlTTextDirection specifies the direction of the label text.

Default: Across

lgLabelJust
The justification of the label text. When the auto-manage feature is on, the Legend object manages the justification internally. Therefore in order to control the label justification explicitly you must first turn off the auto-manage feature.

Default: CenterCenter

lgLabelFont
This resource of type NhlTFont specifies the font used to render the Legend labels.

Default: "pwritx"

lgLabelFontColor
The hlu color index used for drawing the label text.

Default: Foreground

lgLabelFontHeightF
The height in NDC coordinates of the text used to draw the labels. When lgAutoManage is set True, the user cannot directly set the label font height. Rather it is set in response to other factors, such as the current size and shape of the Legend, the current setting of lgBoxMinorExtent, the current text angle of the labels, and how much space there is between the labels. Set lgAutoManage False if you wish to control the label font height directly.

Default: 0.02

lgLabelFontAspectF
Determines the shape of the label font text. Values greater than 1.0 make the text tall and skinny. Values less than one make the text short and wide.

Default: 1.0

lgLabelFontThicknessF
Determines the thickness of the line used to draw the Label text. This resource only affects the Hershey fonts.

Default: 1.0

lgLabelFontQuality
Determines the text quality used to draw the label text.

Default: High

lgLabelConstantSpacingF
Determines a constant amount of extra space that is placed between each character of the label text. Values less than 0.0 result in an error and are replaced with the default value.

Default: 0.0

lgLabelFuncCode
Determines the function code character used when parsing the label string.

This resource may be intercepted or disabled by:

Default: :

lgLabelStride
Determines which labels actually are rendered the Legend is drawn. For example, if the stride is set to 2, only every other label will be drawn, starting with the first label.

Default: 1

lgTitleString
A string containing the text used for the Legend title.

Default: <dynamic>
The name of the Legend object is used if this resource is not set.

lgTitleOn
A boolean flag determining whether the title should appear in the Legend.

Default: True

lgTitlePosition
This resource of type NhlTPosition determines the position of the title with respect to the other elements of the Legend. Valid positions are Top, Bottom, Left, and Right. When you set the title position, Legend automatically adjusts the title direction, unless you explicitly set lgTitleDirectionin the same call. When you set the position to Top or Bottom, the title direction is set to Across; when the position is set to Left or Right, the title direction is set to Down.

Default: Top

lgTitleExtentF
The Legend title occupies a rectangular portion of the Legend viewport bounded on three sides by edges of the viewport and on the fourth by a line determined by the value of this resource. lgTitleExtentF specifies a fraction of the length (minus the margins) of the Legend axis perpendicular to lgTitleSide. At this point along the length of the axis the fourth side of the title extent rectangle is constructed parallel to the side specified by lgTitleSide. The sum of the values given to lgTitleExtentF and lgTitleOffsetF cannot exceed 0.5 (half the length of the axis). If the sum does exceed 0.5, a warning is issued and both values are reset to their default values.

If lgAutoManage is set False, and lgTitleFontHeightF is set such that the title extent rectangle cannot accommodate the full extent of the title text, the viewport of the Legend instance is expanded to fit the title text extent. However, the Legend treats this additional extent as 'extra'. The title extent rectangle does not change its size as long as the Legend view width or height is not explicitly modified. This means that as you set lgTitleFontHeightF to smaller values, the Legend viewport will shrink until its size matches the size it would have had if the text extent fit within the originally set title extent.

Default: 0.15

lgTitleAngleF
The angle of the title text. When the auto-manage feature is on, the title size changes as the text rotates.

Default: 0.0

lgTitleDirection
This resource of type NhlTTextDirection specifies the direction of the title text. When the title position, as set by the resource lgTitlePosition, is Top or Bottom the direction is set by default to Across. When title position is Left or Right the text is set by default to Down.

Default: Across

lgTitleFont
This resource of type NhlTFont specifies the font used to render the Legend title.

Default: "pwritx"

lgTitleFontColor
The hlu index of the color used for the title text.

Default: Foreground

lgTitleJust
The justification used for the title text.

Default: CenterCenter

lgTitleFontHeightF
The font height in NDC units used for the title text. If lgAutoManage is set True, the Legend sets this resource automatically based on the space available and the value of other title font attributes including lgTitleAngleF, lgTitleConstantSpacingF and lgTitleFontAspectF. The available space is determined from the size of the Legend viewport and the setting of the resource lgTitleExtentF. When lgAutoManage is True, attempts by the user to set this resource are simply ignored.

If lgAutoManage is False, the Legend instance will honor the set value of lgTitleFontHeightF, even if it must increase the size of the viewport in order to encompass the full extent of the title text. However, space added in this manner is considered an addition to the 'fundamental' size of the Legend. If the lgTitleFontHeightF is reduced to a value less than or equal to the value that would be used if lgAutoManage were True, then the Legend will resize itself to its 'fundamental' size. If you resize the Legend by setting the width or height of its viewport, lgTitleFontHeightF and the 'fundamental' size both adjust themselves proportionally.

Default: 0.025

lgTitleFontAspectF
Determines the shape of the title font text. Values greater than 1.0 make the text tall and skinny. Values less than one make the text short and wide.

Default: 1.0

lgTitleFontThicknessF
Determines the thickness of the line used to draw the Label text. This resource only affects the Hershey fonts.

Default: 1.0

lgTitleFontQuality
Determines the text quality used to draw the title text.

Default: High

lgTitleConstantSpacingF
Determines a constant amount of extra space that is placed between each character of the title text. Values less than 0.0 result in an error and are replaced with the default value.

Default: 0.0

lgTitleFuncCode
Determines the function code character when parsing the title string.

Default: :

lgBoxLinesOn
A boolean flag determining whether boxes should appear around Legend items.

Default: False

lgBoxLineColor
The hlu index of the color used to draw the box lines around the Legend items.

Default: Foreground

lgBoxLineThicknessF
Determines the thickness of the box lines drawn around the Legend items.

Default: 1.0

lgBoxLineDashPattern
The hlu index of the dash pattern used for the lines drawn around the Legend items.

Default: Solidline

lgBoxLineDashSegLenF
The length in NDC units of the dash pattern used for the box lines around the Legend items.

Default: 0.15

lgPerimOn
A boolean flag determining whether to draw a line around the perimeter of the Legend.

Default: True

lgPerimColor
The hlu index of the color used for the perimeter line.

Default: Foreground

lgPerimFill
The hlu index of the pattern used to fill the background of the Legend area. Only has an effect when the lgPerimFillColor has set to a value greater than NhlTRANSPARENT (-1).

Default: HollowFill

lgPerimFillColor
The hlu index of the color used to fill the background of the Legend area. Only has an effect when the lgPerimFill has a value greater than HollowFill (-1).

Default: Background

lgPerimThicknessF
Specifies the thickness of the perimeter line.

Default: 1.0

lgPerimDashPattern
Specifies the hlu index of the dash pattern used to draw the perimeter of the Legend.

Default: SolidLine

lgPerimDashSegLenF
The length in NDC units of the dash pattern used to draw the perimeter of the Legend.

Default: 0.15


Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.23 $ $Date: 1998/08/19 01:09:17 $