NCL Home > Documentation > Graphics > Resources

XyPlot (xy) Resources

xyComputeXMax
If this resource is True, then the trXMaxF resource will be recalculated every time the xyCoordData resource is modified. If this resource is False, then the trXMaxF resource will not be recalculated each time the xyCoordData resource is modified.

Default: <dynamic>
If the programmer specifies the trXMaxF resource, then the default for this resource will be False. If the programmer doesn't specify the trXMaxF resource, then the default for this resource will be True.

xyComputeXMin
If this resource is True, then the trXMinF resource will be recalculated every time the xyCoordData resource is modified. If this resource is False, then the trXMinF resource will not be recalculated each time the xyCoordData resource is modified.

Default: <dynamic>
If the programmer specifies the trXMinF resource, then the default for this resource will be False. If the programmer doesn't specify the trXMinF resource, then the default for this resource will be True.

xyComputeYMax
If this resource is True, then the trYMaxF resource will be recalculated every time the xyCoordData resource is modified. If this resource is False, then the trYMaxF resource will not be recalculated each time the xyCoordData resource is modified.

Default: <dynamic>
If the programmer specifies the trYMaxF resource, then the default for this resource will be False. If the programmer doesn't specify the trYMaxF resource, then the default for this resource will be True.

xyComputeYMin
If this resource is True, then the trYMinF resource will be recalculated every time the xyCoordData resource is modified. If this resource is False, then the trYMinF resource will not be recalculated each time the xyCoordData resource is modified.

Default: <dynamic>
If the programmer specifies the trYMinF resource, then the default for this resource will be False. If the programmer doesn't specify the trYMinF resource, then the default for this resource will be True.

xyCoordData
Specifies the array of data object ids that provide the X/Y coordinate pairs to be plotted. This resource is a data resource partially managed with the help of the DataComm superclass.

Default: NULL

xyCoordDataSpec
This resource is a retrievable resource only. It is used to allow the user a greater amount of configurability for how each coordinate pair array is displayed in the XyPlot. After adding DataItems to the XyPlot xyCoordData resource, this resource can be retrieved to get an array of XyDataSpec object ids. This array is ordered so that the elements of this array correspond directly with the elements of the xyCoordData array resource. The XyDataSpec resources can be set to each object in this array. This will determine exactly how the corresponding DataItem in the xyCoordData resource will be rendered in the XyPlot.

Default: NULL

xyCurveDrawOrder
This resource of type NhlTDrawOrder determines when the curves representing X/Y coordinate data are drawn relative to other elements of the plot. Ordinarily, you only need to adjust the draw order of the curves when an XyPlot is combined with other plots in an overlay sequence. There are three choices:
PreDraw
Draw the XyPlot curves before the standard draw; the lines will be overlaid by any subsequently drawn elements.
Draw
Draw the curves during the standard draw; the lines will overlay any elements drawn during the predraw phase, but will underlie elements drawn during the postdraw phase.
PostDraw
Draw the curves after the standard draw; the lines will overlay any elements drawn during the predraw and draw phases.

Default: Draw

xyDashPattern
This resource determines the dash pattern index that all the curves derived from the associated data object will be drawn with if xyMonoDashPattern is True.

Default: SolidLine

xyDashPatterns
An array of integer dash pattern indexes to use when drawing the corresponding curves in the associated data object. If there are more curves than the number of dash pattern indexes in this resource, the remaining curves will be drawn using the xyDashPattern resource.

This resource is only used if the xyMonoDashPattern resource is False.

Default: NULL

xyExplicitLabels
An array of character strings to place inside the corresponding curve in the associated DataItem. If there are more curves than the number of strings in this resource, the remaining curves will be labeled by using the name of the XyDataSpec object and appending the curve index.

Default: NULL

xyExplicitLegendLabels
An array of character strings to use as labels in the XyPlot legend. The legend labels will default to the values in the xyExplicitLabels resource. If there are more coordinate pair arrays than the number of elements in this resource, the remaining coordinate pair arrays will also be labeled with the corresponding value of the xyExplicitLabels resource.

Default: NULL

xyLabelMode
This can be set to either NoLabels, Lettered, or Custom. NoLabels means that the curves from the associated DataItem will not be labeled. Lettered means that the curves will be labeled with capital letters in the order in which they appear in the associated DataItem. The current letter is retained so that if the next XyDataSpec in the list is using Lettered, the letter will not be reused until the entire alphabet has been used. (Note: This means that Lettered curves do not necessarily retain the same label when data are added or removed from the xyCoordData resource. Custom means that the curves will be labeled with the corresponding strings provided by the xyExplicitLabels resource. If there is no corresponding string, the curves will be labeled by using the name of the XyDataSpec object and appending the curve index.

Default: NoLabels

xyLineColor
This resource determines what color all the curves derived from the associated data object will be drawn with if xyMonoLineColor is True.

You can use a color index value (integer) or a named color (string).

Default: Default: Foreground (1)

xyLineColors
An array of colors to use when drawing the corresponding curves in the associated data object. If there are more curves than the number of colors given in this resource, the remaining curves will be drawn using the xyLineColor resource.

You can use an array of color indices (integers) or named colors (strings).

This resource is only used if the xyMonoLineColor resource is False.

Default: NULL

xyLineDashSegLenF
This resource indicates the length of each segment of a dash pattern. It is the length in NDCs before the dash pattern repeats itself. This resource automatically scales with changes in the size of the viewport of the XyPlot. If line labels are being drawn, this is also the length between the end of one label and the start of the next.

Default: <dynamic>
This resource defaults to 25 percent of the average of the XyPlot's width and height.

xyLineLabelConstantSpacingF
Normally when xyLineLabelFontQuality is set to High, the XyPlot object writes line label text with proportional spacing. Setting the xyLineLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of xyLineLabelConstantSpacingF. When xyLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when xyLineLabelFontQuality is not High. Values less than 0.0 result in an error and are replaced with the default value.

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Default: 0.0

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

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Default: "pwritx"

xyLineLabelFontAspectF
This resource determines the shape of the line label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Default: 1.3125

xyLineLabelFontColor
This resource indicates what color to draw the line labels if xyLabelMode is set to Lettered or Custom. This value is only used if xyMonoLineLabelFontColor is True, or the xyLineLabelFontColors array doesn't specify enough values.

You can use a color index value w(integer) or a named color (string).

Default: Foreground (1)

xyLineLabelFontColors
This resource indicates what color index to draw the line labels in if xyLabelMode is set to Lettered or Custom. It is an array of NhlColorIndexes that indicate the color for the line labels in the corresponding coordinate arrays in the associated data object. If there are more coordinate arrays than the number of NhlColorIndexes in this resource, the remaining coordinate arrays will be drawn using the xyLineLabelFontColor resource.

Default: NULL

xyLineLabelFontHeightF
This allows the user to set the size of the characters used for the curve labels when the data-dependent resource xyLabelMode is set to LETTERED or CUSTOM. The size of the font is expressed in NDCs and scales with changes in the size of the viewport of the XyPlot object.

Default: <dynamic>
This resource defaults to 1.5 percent of the average of the XyPlot's width and height.

xyLineLabelFontQuality
This resource of type NhlTFontQuality determines the quality of the font used to draw XyPlot line labels.

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Default: High

xyLineLabelFontThicknessF
Sets the thickness of the line used to draw line label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the xyLineLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Default: 1.0

xyLineLabelFuncCode
This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the label string.

Note that there is only a scalar version of this resource. If the XyPlot object references more than one DataItem object, the XyDataSpec object referenced by the first element of the xyCoordDataSpec array will provide the resource value for all line labels.

Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.

Default: ~

xyLineThicknessF
This resource sets the linewidth scale factor for curves derived from the associated data object if xyMonoLineThickness is True.

Default: 1.0

xyLineThicknesses
An array of floating point numbers that are used as linewidth scale factors when drawing the corresponding curves in the associated data object. If there are more curves than the number of floating point numbers in this resource, the remaining curves will be drawn using the xyLineThicknessF resource.

This resource is only used if the xyMonoLineThickness resource is False.

Default: NULL

xyMarkLineMode
This resource of type NhlTMarkLineMode determines if markers, lines, or both markers and lines will be displayed for all coordinate arrays derived from the associated data object if xyMonoMarkLineMode is True. There are three choices:

Lines
Draw the curves using lines only.
Markers
Draw the curves using markers only.
MarkLines
Draw the curves using both lines and markers.

Default: Lines

xyMarkLineModes
An array of NhlTMarkLineMode enumerations to use when drawing the corresponding coordinate pair arrays in the associated data object. If there are more coordinate pair arrays than the number of elements in this resource, the remaining coordinate pair arrays will be drawn using the value of the xyMarkLineMode resource.

Default: NULL

xyMarker
This resource indicates which marker index all the coordinate pair arrays derived from the associated data object will be drawn with if xyMonoMarker is True.

Default: 0

xyMarkerColor
This resource indicates what color all markers drawn using the coordinate arrays from the associated data object will be drawn with if xyMonoMarkerColor is True.

You can use a color index value (integer) or a named color (string).

Default: Foreground (1)

xyMarkerColors
An array of color indexes to use when drawing the markers for the corresponding coordinate arrays in the associated data object. If there are more coordinate arrays than the number of color indexes in this resource, the remaining coordinate arrays will be drawn using the xyMarkerColor resource.

Default: NULL

xyMarkerSizeF
This resource indicates the size for all markers drawn using the coordinate arrays from the associated data object if xyMonoMarkerSize is True.

The size is in NDCs.

Default: .01

xyMarkerSizes
An array of floats that indicate the size for the markers in the corresponding coordinate arrays in the associated data object. If there are more coordinate arrays than the number of floats in this resource, the remaining coordinate arrays will be drawn using the xyMarkerSizeF resource.

The size is in NDCs.

Default: NULL

xyMarkerThicknessF
This resource sets the linewidth scale factor for markers derived from the associated data object if xyMonoMarkerThickness is True.

Default: 1.0

xyMarkerThicknesses
An array of floating point numbers that are used as linewidth scale factors to use when drawing the markers in the corresponding coordinate pair arrays in the associated data object. If there are more coordinate pair arrays than the number of floating point numbers in this resource, the remaining coordinate pair arrays will be drawn using the xyMarkerThicknessF resource.

This resource is only used if the xyMonoMarkerThickness resource is False.

Default: NULL

xyMarkers
An array of marker indexes to use when drawing the corresponding coordinate arrays in the associated data object. If there are more coordinate arrays than the number of enumerations in this resource, the remaining coordinate arrays will be drawn using the value of the xyMarker resource.

Default: NULL

xyMonoDashPattern
If this resource is True, then all the curves in the associated data object will be drawn with the dash pattern specified by the xyDashPattern resource. Otherwise, the curves are drawn with the dash pattern specified by the corresponding index in the xyDashPatterns array resource.

Default: False

xyMonoLineColor
If this resource is True, then all the curves in the associated data object will be drawn in the color specified by the xyLineColor resource. Otherwise, the curves are drawn in the color specified by the corresponding index in the xyLineColors array resource.

Default: False

xyMonoLineLabelFontColor
If this resource is True, then all the line labels for the corresponding coordinate arrays in the associated data object will be drawn with the color specified by the xyLineLabelFontColor resource. Otherwise, each coordinate array's markers are drawn with the color specified by the corresponding index in the xyLineLabelFontColors array resource.

Default: False

xyMonoLineThickness
If this resource is True, then all the curves in the associated data object will be drawn with the width factor specified by the xyLineThicknessF resource. Otherwise, the curves are drawn with the thickness specified by the corresponding index in the xyLineThicknesses array resource.

Default: False

xyMonoMarkLineMode
If this resource is True, then all the coordinate pair arrays in the associated data object will be drawn as specified by the xyMarkLineMode resource. Otherwise, the coordinate pair arrays are drawn in the NhlTMarkLineMode specified by the corresponding index in the xyMarkLineModes array resource.

Default: False

xyMonoMarker
If this resource is True, then all the coordinate arrays in the associated data object will be drawn with the marker index specified by the xyMarker resource. Otherwise, the coordinate arrays are drawn with the marker specified by the corresponding index in the xyMarkers array resource.

Default: False

xyMonoMarkerColor
If this resource is True, then all the markers for the corresponding coordinate arrays in the associated data object will be drawn in the color specified by the xyMarkerColor resource. Otherwise, each coordinate array's markers are drawn in the color specified by the corresponding index in the xyMarkerColors array resource.

Default: False

xyMonoMarkerSize
If this resource is True, then all the markers for the corresponding coordinate arrays in the associated data object will be drawn with the size specified by the xyMarkerSizeF resource. Otherwise, each coordinate array's markers are drawn with the size specified by the corresponding index in the xyMarkerSizes array resource.

Default: False

xyMonoMarkerThickness
If this resource is True, then all the curves in the associated data object will be drawn with the width factor specified by the xyMarkerThicknessF resource. Otherwise, the curves are drawn with the thickness specified by the corresponding index in the xyMarkerThicknesses array resource.

Default: False

xyXIrrTensionF
Specifies the tension to apply to the spline approximation used to determine the transformation for the xyXIrregularPoints. This resource is only used if xyXStyle is Irregular.

Default: 2.0

xyXIrregularPoints
An array of floats that specify a discrete representation of an irregular coordinate system. The values in this array must be monotonically increasing or decreasing. This resource is only used if xyXStyle is Irregular.

Default: NULL

xyXStyle
Sets the style for the X-Axis of the XyPlot. The styles are Log, Linear, and Irregular These are identical to the styles available through the TickMark object. XyPlot does not allow the programmer to set the top and bottom styles directly like it is done in the TickMark object. To achieve multiple scales (i.e. Pressure on top, Km on bottom), either the tmXBMode or the tmXTMode resource can be set to Explicit, and the alternate scale can be provided using the tmXBValues and tmXBLabels resources or the tmXTValues and tmXTLabels resources.

Default: Linear

xyYIrrTensionF
Specifies the tension to apply to the spline approximation used to determine the transformation for the xyYIrregularPoints. This resource is only used if xyYStyle is Irregular.

Default: 2.0

xyYIrregularPoints
An array of floats that specify a discrete representation of an irregular coordinate system. The values in this array must be monotonically increasing or decreasing. This resource is only used if xyYStyle is Irregular.

Default: NULL

xyYStyle
Sets the style for the Y Axis of the XyPlot. The styles are Log, Linear, and Irregular. These are identical to the styles available through the TickMark object. XyPlot does not allow the programmer to set the left and right styles directly like it is done in the TickMark object. To achieve multiple scales (i.e. Pressure on left, Km on right), either the tmYLMode or the tmYRMode resource can be set to Explicit, and the alternate scale can be provided using the tmYLValues and tmYRLabels resources or the tmYLValues and tmYRLabels resources.

Default: Linear