Example Program and Statement Details

Overview

The LAYOUT OVERLAYEQUATED statement is used for equated layouts where the X and Y axes always have equal increments between tick values. Because the axes within the equated layout are so closely correlated, some axis adjustments cannot be applied to one axis without applying them to the other.
For example, the INTEGER= option sets evenly spaced integer values for the axis tick marks. That setting must be applied to both axes if the correlation between them is to be maintained. The LAYOUT OVERLAYEQUATED statement provides the COMMONAXISOPTS= option for specifying the INTEGER= option and other options whose settings apply in common to both axes.
Despite the close correlation between the axes, some axis adjustments can be made to one axis without affecting the other. For example, displaying grid lines on one axis has no impact on the other. The XAXISOPTS= and YAXISOPTS= options are available for applying settings separately to the X and Y axes.
The following example template sets evenly spaced integer values for the axis tick marks of both axes. It also specifies the display of grid lines, tick marks, and tick values for the Y axis:
begingraph;
  layout overlayequated /
    commonaxisopts=(integer=true);
    yaxisopts=(griddisplay=on display=(ticks tickvalues));
    seriesplot x=var1 y=var2;
  endlayout;
endgraph;
Interaction. The OVERLAYEQUATED’s axis options are ignored when the LAYOUT OVERLAYEQUATED statement is nested within another layout type that has external axes in effect. For example, the axis options are ignored when the statement is nested within a LAYOUT LATTICE with a COLUMNAXIS= or ROWAXIS= option in effect.

Options That Apply in Common to Both Equated Axes

The options that are documented in this section are applied to both axes and cannot be applied separately to an X or Y axis. See Options That Apply Separately to an X or Y Equated Axis for a list of options that can be applied to a single axis.
COMMONAXISOPTS= ( common-equated-axis-options )
specifies one or more options to apply to both the X and Y equated axes. Options must be enclosed in parentheses. Each option is specified as a name = value pair and each pair is space separated.
Equated-Axis-Option
Description
Specifies that evenly spaced integer values are used for tick marks for all axes.
Specifies the placement of tick marks in relation to the axis line.
Specifies the order of the tick values as list.
Specifies whether an axis tick specification can extend the axis data range.
Specifies the tick values by start, end, and increment.
Specifies the maximum data value to include in the display.
Specifies the minimum data value to include in the display.
INTEGER=boolean
specifies that evenly spaced integer values are used for tick marks for all axes.
Default: FALSE
Interaction: This option is overridden by the TICKVALUELIST= or TICKVALUESEQUENCE= option.
Interaction: This option overrides the MAXDECIMALS= and PREFERREDDECIMALS= suboptions of the TICKVALUEFORMAT= option on XAXISOPTS= or YAXISOPTS=.
TICKSTYLE=OUTSIDE | INSIDE | ACROSS
specifies the placement of tick marks in relation to the axis line. The figure shows the tick display on an X axis.
appearance of each axis tick style
Default: OUTSIDE
OUTSIDE
displays tick marks outside of the axis line.
INSIDE
displays tick marks inside of the axis line.
ACROSS
displays tick marks across the axis line.
Interaction: This option is ignored if the ticks are not displayed. See the DISPLAY= and DISPLAYSECONDARY= suboptions of XAXISOPTS= and YAXISOPTS=.
This option has no affect on the placement of the tick values, which are always outside the axis line.
TICKVALUELIST=( numeric-list )
specifies the tick values as a list.
Default: An internal algorithm determines the tick marks based on the actual axis data range or the data range established by the VIEWMIN= and VIEWMAX= options. By default when this option is used, the only tick values that appear are the numeric-list tick values that fall within the explicit data range (set by VIEWMIN= and VIEWMAX=) or implicit data range (set by the actual data minimum and data maximum).
Requirement: The numeric-list must be enclosed in parentheses and each item separated by a blank.
Interaction: This option overrides the INTEGER= option.
Interaction: This option is ignored if the LAYOUT OVERLAYEQUATED statement specifies EQUATETYPE=FIT (the default).
Interaction: This option is ignored if the TICKVALUESEQUENCE= option is specified, or if the DISPLAY= option does not display tick values.
Interaction: The VIEWMIN= and VIEWMAX= options alter the axis data range. If the VIEWMIN= option is set to the minimum tick list value and the VIEWMAX= option is set to the maximum tick list value, all ticks in the tick list are displayed.
Interaction: If the TICKVALUEPRIORITY= is set to TRUE, 1) the VIEWMIN= and VIEWMAX= options are ignored if they are fully enclosed by the numeric-list 2) the tick numeric-list can extend the implicit data range of the axis, but never reduce it.
The values in the list are formatted according to the setting for the TICKVALUEFORMAT= option on XAXISOPTS= or YAXISOPTS=.
TICKVALUEPRIORITY=boolean
specifies whether an axis tick specification (TICKVALUELIST= or TICKVALUESEQUENCE=) can extend the axis data range.
Default: FALSE
FALSE
the only tick values that appear are the user-specified tick values that fall within the explicit data range (set by VIEWMIN= and VIEWMAX= ) or implicit data range (set by the actual data minimum and data maximum).
TRUE
the axis data range might be extended (but not reduced) to include the minimum and maximum specified by either the TICKVALUELIST= or TICKVALUESEQUENCE= option. If minimum and maximum of the user-specified values are within the data range, this option has no effect.
Interaction: When this option is set to TRUE, the VIEWMIN= and VIEWMAX= options are ignored if they are fully enclosed by value range set by the TICKVALUELIST= or TICKVALUESEQUENCE= option.
Interaction: This option is ignored if the DISPLAY= option does not display tick marks.
TICKVALUESEQUENCE=( sequence-options )
specifies the tick values by start, end, and increment.
Default: An internal algorithm determines the tick marks based on the actual axis data range or the data range established by the VIEWMIN= and VIEWMAX= options. By default when this option is used, the only tick values that appear are those that fall within the explicit data range (set by VIEWMIN= and VIEWMAX=) or implicit data range (set by the actual data minimum and data maximum).
(sequence-options)
Three options that control tick values. All three options must be provided.
START = number Specifies the value for the first tick mark.
END = number Specifies the value for the last tick mark.
INCREMENT = number Specifies the increment for intermediate tick marks between the first and last tick marks. The END value always controls the last tick mark. The interval between the last tick mark and the previous tick mark might not necessarily be the INCREMENT value.
Interaction: This option is ignored if the LAYOUT OVERLAYEQUATED statement specifies EQUATETYPE=FIT (the default), or if the DISPLAY= option does not display tick marks.
Interaction: This option overrides the INTEGER= option.
Interaction: The VIEWMIN= and VIEWMAX= options alter the axis data range. If the VIEWMIN= option is set to the START= option value and the VIEWMAX= option is set to the END= option value, all ticks in the tick sequence are displayed.
Interaction: If the TICKVALUEPRIORITY= option is set to TRUE, the tick sequence might extend the explicit data range of the axis, but never reduce it.
The values in the sequence are formatted according to the setting for the TICKVALUEFORMAT= option on XAXISOPTS= or YAXISOPTS=.
See also: TICKVALUELIST= option as an alternative for customizing tick marks.
VIEWMAX= number
specifies the maximum data value to include in the display (the value might be adjusted by the threshold calculation). For more information, see Adjusting the Axis View.
Default: The maximum value in the data for the specified axis.
Interaction: This option does not determine the maximum axis tick value displayed. The THRESHOLDMAX= value is used to determine the maximum tick value.
Interaction: This option has no effect if the TICKVALUEPRIORITY= is set to TRUE.
Setting a VIEWMAX= or VIEWMIN= value does not alter the original data or any calculations on it.
VIEWMIN= number
specifies the minimum data value to include in the display (the value might be adjusted by the threshold calculation). For more information, see Adjusting the Axis View.
Default: The minimum value in the data for the specified axis.
Interaction: This option does not determine the minimum axis tick value displayed. The THRESHOLDMIN= value is used to determine the maximum tick value.
Interaction: This option has no effect if the TICKVALUEPRIORITY= is set to TRUE.
Setting a VIEWMAX= or VIEWMIN= value does not alter the original data or any calculations on it.

Options That Apply Separately to an X or Y Equated Axis

The options that are documented in this section can be applied to an X axis with the XAXISOPTS= option, or to the Y axis with the YAXISOPTS= option. See Options That Apply in Common to Both Equated Axes for a list of options that apply in common to both axes.
XAXISOPTS= ( equated-axis-options ), YAXISOPTS= ( equated-axis-options )
each option specifies one or more options for an equated axis. Options must be enclosed in parentheses. Each option is specified as a name = value pair and each pair is space separated.
Equated-Axis-Option
Description
Controls which axis features are displayed on the primary axis.
Controls which axis features are displayed on the secondary axis.
Specifies the attributes of the grid lines.
Specifies when axis grid lines are displayed.
Specifies the axis label.
Specifies the color and font attributes of the axis label.
Reserves an area at the maximum end of the axis. No tick marks are displayed in the reserved area.
Reserves an area at the minimum end of the axis. No tick marks are displayed in the reserved area.
Specifies an alternate axis label to use if the default or specified axis label is too long for the axis length.
Specifies a bias for including one more tick mark at the maximum end of the axis.
Specifies a bias for including one more tick mark at the minimum end of the axis.
Specifies the color and font attributes of the axis tick values.
Specifies a policy for avoiding tick value collision. Only the default policy (THIN) is available for a Y or Y2 axis.
Specifies how to format the values for tick marks.
DISPLAY=STANDARD | ALL | NONE | ( display-options )
controls which axis features are displayed on the primary axis.
Default: STANDARD
STANDARD
specifies that the LABEL, LINE, TICKS, and TICKVALUES are displayed
ALL
specifies that LABEL, LINE, TICKS, and TICKVALUES are displayed
NONE
specifies that no axis features are displayed
(display-options)
a list of space-delimited options, enclosed in parentheses. The list must include one or more of the following:
LABEL displays the axis label
LINE displays the axis line
TICKS displays the tick marks
TICKVALUES displays the values that are represented by the tick marks
The default line attributes for the axis line and axis tick marks are defined in the GraphAxisLine style element.
See GRIDDISPLAY= and GRIDATTRS= for setting axis grid lines.
DISPLAYSECONDARY=NONE | ALL | STANDARD | ( display-options )
controls which axis features are displayed on the secondary axis. When data are mapped to the X or Y axis, you can display an X2 or Y2 (secondary) axis using this option. The secondary axis is a duplicate of the X or Y axis but can have different display options.
Default: NONE
NONE
specifies that no axis features are displayed
STANDARD
specifies that the LABEL, LINE, TICKS, and TICKVALUES are displayed on the secondary axis
ALL
specifies that LABEL, LINE, TICKS, and TICKVALUES are displayed on the secondary axis
(display-options)
a list of space-delimited options, enclosed in parentheses. The list must include one or more of the following:
LABEL displays the axis label
LINE displays the axis line
TICKS displays the tick marks
TICKVALUES displays the values that are represented by the tick marks
GRIDATTRS=style-element | style-element (line-options) | (line-options)
specifies the attributes of the grid lines. See General Syntax for Attribute Options for the syntax on using a style-element and Line Options for available line-options.
Default: The GraphGridLines style element.
Interaction: This option is ignored if the GRIDDISPLAY= option does not display the grid lines.
GRIDDISPLAY=AUTO_OFF | AUTO_ON | ON | OFF
specifies when axis grid lines are displayed.
Default: AUTO_OFF
AUTO_OFF
specifies that grid lines are not displayed unless the GraphGridLines element in the current style contains DisplayOpts="ON."
AUTO_ON
specifies that grid lines are displayed unless the GraphGridLines element in the current style contains DisplayOpts="OFF."
ON
specifies that grid lines are always displayed. The current style has no override.
OFF
specifies that grid lines are never displayed. The current style has no override.
This option enables the template to absolutely control the display of grid lines or to allow interaction with the current style to decide whether grid lines are displayed.
Supplied styles use DisplayOpts="AUTO," which means that the style has no "preference" about grid lines and the graphics template setting for grid lines is always used.
Discussion: The following table shows the end results for various combinations of the GRIDDISPLAY= option and the DisplayOpts= attribute of the GraphGridLines style element. Most supplied templates use the default setting AUTO_OFF to indicate a preference for not displaying grid lines, but allowing the style to override.
GRIDDISPLAY= option
DisplayOpts= style attribute
Grid Lines Shown?
AUTO_OFF
AUTO
no
AUTO_OFF
ON
yes
AUTO_OFF
OFF
no
AUTO_ON
AUTO
yes
AUTO_ON
ON
yes
AUTO_ON
OFF
no
ON
any value
yes
OFF
any value
no
LABEL="string" | ( "string" …"string" )
specifies the axis label. The string can be either a string literal or a dynamic. The list form implies that all included string literals or dynamics will be concatenated
Default: The default label is derived from the primary plot in the layout. For more information, see When Plots Share Data and a Common Axis.
Interaction: If the axis label is too long to fit along the axis, it is truncated by default. Use the SHORTLABEL= option to specify an alternate axis label to be used whenever truncation would normally occur.
Interaction: This option is ignored if the DISPLAY= option does not display the axis label.
LABELATTRS=style-element | style-element (text-options) | (text-options)
specifies the color and font attributes of the axis label. See General Syntax for Attribute Options for the syntax on using a style-element and Text Options for available text-options.
Default: The GraphLabelText style element.
Interaction: This option is ignored if the DISPLAY= option does not display the axis label.
OFFSETMAX=AUTO | AUTOCOMPRESS | number
reserves an area at the maximum end of the axis. No tick marks are displayed in the reserved area. For more information, see Adjusting Axis Offsets.
Default: AUTO
Range: 0 - 1. The sum of OFFSETMAX= and OFFSETMIN= should not be more than 1.
AUTO
Reserves just enough area to fully display markers and other graphical features near the maximum end of an axis.
AUTOCOMPRESS
Automatic offset applied that prevents axis labels and tick values from extending beyond the axis length.
number
The offset is expressed as a decimal proportion of the full axis length.
OFFSETMIN=AUTO | AUTOCOMPRESS | number
reserves an area at the minimum end of the axis. No tick marks are displayed in the reserved area. For more information, see Adjusting Axis Offsets.
Default: AUTO
Range: 0 - 1. The sum of OFFSETMAX= and OFFSETMIN= should not be more than 1.
AUTO
Reserves just enough area to fully display markers and other graphical features near the maximum end of an axis.
AUTOCOMPRESS
Automatic offset applied that prevents axis labels and tick values from extending beyond the axis length.]
number
The offset is expressed as a decimal proportion of the full axis length.
SHORTLABEL="string"
specifies an alternate axis label. This label is used when the default axis label or label specified by the LABEL= option is too long for the axis length.
Default: no default
Interaction: This option is ignored if the DISPLAY= option does not display the axis label.
If the specified label is itself too long for the axis, it is truncated in the display.
THRESHOLDMAX= number
specifies a bias for including one more tick mark at the maximum end of the axis. For more information, see Adjusting Axis Thresholds.
Default: .30
Range: 0 - 1
Interaction: This option is ignored if the TICKVALUELIST= or TICKVALUESEQUENCE= option is used.
THRESHOLDMIN= number
specifies a bias for including one more tick mark at the minimum end of the axis. For more information, see Adjusting Axis Thresholds.
Default: .30
Range: 0 - 1
Interaction: This option is ignored if the TICKVALUELIST= or TICKVALUESEQUENCE= option is used.
TICKVALUEATTRS=style-element | style-element (text-options) | (text-options)
specifies the color and font attributes of the axis tick values. See General Syntax for Attribute Options for the syntax on using a style-element and Text Options for available text-options.
Default: The GraphValueText style element.
Interaction: This option is ignored if the DISPLAY= option does not display tick values.
TICKVALUEFITPOLICY=policy
specifies an ordered list of strategies to avoid tick value collision. Only the default setting (THIN) is available for a Y or Y2 axis.
Default: THIN
The collision-avoidance policy that is most effective depends on the number of tick values, their length, and the length of the axis. For an X or X2 axis, the policy can be one of the following:
THIN
Eliminate alternate tick values.
ROTATE
Tick values are rotated 45 degrees.
ROTATETHIN
Attempt ROTATE policy and then THIN policy.
STAGGER
Tick values alternate between two rows.
STAGGERROTATE
Attempt STAGGER policy and then ROTATE policy.
STAGGERTHIN
Attempt STAGGER policy and then THIN policy.
TICKVALUEFORMAT=( format-options ) | DATA | format
specifies how to format the values for tick marks.
Default: ( MAXWIDTH=8, MAXDECIMALS=6, PREFERREDDECIMALS=2, EXTRACTSCALE=FALSE)
(format-options)
specifies one or more tick value formatting options. Together, these options provide parameters for determining an optimal format ( w.d, Ew., BESTw.) for displaying tick values.
MAXWIDTH = integer Specifies the maximum width for displayed tick values. Values might be rounded or converted to E-notation to fit into this width.
MAXDECIMALS = integer Specifies the maximum number of decimals for displayed tick values. Values might be rounded or converted to E-notation to fit into this width. MAXWIDTH > MAXDECIMALS
PREFERREDDECIMALS = integer Specifies the number of decimal places desired for most values. The actual number might vary based on other constraints.
EXTRACTSCALE = boolean Specifies whether to extract some factor of ten from all tick values in order to reduce the overall width of the tick values and improve legibility. The extracted factor is concatenated to the existing axis label. Example of revised axis label: Number Sold (x1000)
DATA
use the format that has been assigned to the variable contributing to the axis (or BEST6. if no format is assigned) to control the formatting of the tick values.
format
specifies a format that controls how the tick values are formatted.
Restriction: The format-options are used only when no format has been assigned to the variable that contributes to the axis or when the assigned format(s) are w.d, Ew. or BESTw.
Restriction: GTL currently honors most but not every SAS format. For details, see SAS Formats Not Supported.
Interaction: If the axis label is not displayed, the EXTRACTSCALE=TRUE format-option is ignored.