Example Program and Statement Details

Overview

The LAYOUT OVERLAY3D statement provides XAXISOPTS=, YAXISOPTS=, and ZAXISOPTS= options that enable you to manage the axis display separately for the X, Y, and Z axes. The following example template uses the YAXISOPTS= option to manage the display of grid lines, tick marks, and tick values on a Y axis:
begingraph;
  layout overlay3d /
    yaxisopts=(
      griddisplay=on
      display=(ticks tickvalues)
    );
    bihistogram3dparm x=rater y=customer z=percent;
  endlayout;
endgraph;
Within an OVERLAY3D layout block, each plot axis is always either a linear or a time axis. The default axis-type setting is AUTO, which specifies that the axis type be automatically determined by the plot or the overlay contents. The TYPE= option enables you to explicitly specify either a LINEAR or a TIME axis type. When you override the default axis type, you must be sure to specify the correct axis type for the plot(s) that you are defining.
Each axis type has features specific to that type, and the axis options LINEAROPTS= and TIMEOPS= enable you to specify features for a linear or a time axis. You can combine one or more general axis options with the options for the specific axis type. However, specified settings are applied only to the axis type that supports them. For example, if you specify general axis options with time axis options and the generated graph produces a linear axis type, the time axis options are ignored.
Unless otherwise indicated in an option description, each axis option is available for the X, Y, and Z axis.

General Options for All Axes in an Overlay3D

The options that are documented in this section can be used with either axis type that is supported within an OVERLAY3D layout. Subsequent sections in the chapter document the axis options that are available only for the specific axis type: linear or time.
Statement Option
Description
Controls which axis features are displayed.
Specifies the attributes of the grid lines.
Specifies whether axis grid lines are displayed.
Specifies the axis label.
Specifies the color and font attributes of the axis label.
Specifies options for a standard numeric interval axis.
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 the color and font attributes of the axis tick values.
Specifies options for a TIME axis.
Specifies the type of axis to use.
DISPLAY=STANDARD | ALL | NONE | ( display-options )
controls which axis features are displayed.
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 major 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.
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 whether 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.
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.
LINEAROPTS=( linear-axis-options )
specifies one or more linear-axis-options for a numeric interval axis. See Options for Linear Axes Only.
OFFSETMAX=AUTO | 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.
number
The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset follows the highest data value or highest tick value, whichever is greater.
OFFSETMIN=AUTO | 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 minimum end of an axis.
number
The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset precedes the lowest data value or lowest tick value, whichever is less.
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.
TIMEOPTS=( time-axis-options )
specifies one or more time-axis-options for a time axis. See Options for Time Axes Only.
TYPE=AUTO | LINEAR | TIME
specifies the type of axis to use.
Default: AUTO
AUTO
Requests that the axis type be automatically determined by the plot or the overlay contents.
LINEAR
Use a LINEAR axis if possible. You can add a LINEAROPTS= ( ) option list to customize this axis type.
TIME
Use a TIME axis if possible. Data for this axis must be SAS time, SAS date, or SAS datetime values. You can add a TIMEOPS= ( ) option list to customize this axis type.
Interaction: If this option is set to anything other than AUTO, plots within the layout are dropped from the display if their data types or data ranges do not match the axis type requirements. For more information, see Plot Axis Types Must Agree on Common Axes.
Interaction: After the axis type is determined (whether you set a specific type or AUTO is in effect), only options supported by that axis type can be used. For example, if TYPE=TIME, only the general OVERLAY3D axis options and those available on TIMEOPS= are supported.

Options for Linear Axes Only

LINEAROPTS=( linear-axis-options )
specifies one or more options for a numeric interval axis. Options must be enclosed in parentheses. Each option is specified as a name = value pair and each pair is space separated.
Interaction: This option is ignored if the axis type is not LINEAR.
Linear-Axis-Option
Description
Specifies that evenly spaced integer values are used for tick marks.
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 how to format the values for major tick marks.
Specifies the order of the tick values for a linear axis as list.
Specifies the tick values for a linear axis by start, end, and increment.
INTEGER=boolean
specifies that evenly spaced integer values are used for tick marks.
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
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.
TICKVALUEFORMAT=( format-options ) | DATA | format
specifies how to format the values for major tick marks.
Default: ( MAXWIDTH=8, MAXDECIMALS=6, PREFERREDDECIMALS=2, EXTRACTSCALE=FALSE)
(format-options)
specifies one or more major tick value formatting options. Together, these options provide parameters for determining an optimal format ( w.d, Ew., BESTw.) for displaying major 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(s) contributing to the axis (or BEST6. if no format is assigned) to control the formatting of the major tick values.
format
use this format to control how the major tick values are formatted.
Restriction: The format-option are used only when no format has been assigned to the variable(s) that contribute 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 is format-option ignored.
TICKVALUELIST=( numeric-list )
specifies the tick values for a linear axis as list.
Default: An internal algorithm determines the tick values.
Requirement: The numeric-list must be enclosed in parentheses and each item separated by a blank.
Interaction: This option overrides the INTEGER= option.
Interaction: The values in the list are formatted according to the setting for the TICKVALUEFORMAT= option.
If ticks are specified outside of the axis range, then the axis range is extended to display the ticks.
See also: TICKVALUESEQUENCE= option as an alternative for customizing tick marks.
TICKVALUESEQUENCE=( sequence-options )
specifies the tick values for a linear axis by start, end, and increment.
Default: An internal algorithm determines the tick marks.
(sequence-options)
Three options that control major 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 overrides the INTEGER= option.
Interaction: This option is ignored if the DISPLAY= option does not display tick marks.
Interaction: The values in the sequence are formatted according to the setting for the TICKVALUEFORMAT= option.
If ticks are specified outside of the axis range, then the axis range is extended to display the ticks.
See also: TICKVALUELIST= option as an alternative for customizing tick marks.

Options for Time Axes Only

TIMEOPTS=( time-axis-options )
specifies one or more options for a time axis.
Variables associated with a time axis must be in SAS time, SAS date, or SAS datetime units and have an associated SAS time, date, or datetime format.
Options must be enclosed in parentheses. Each option is specified as a name = value pair and each pair is space separated.
Interaction: This option is ignored if the axis type is not TIME.
Time-Axis-Option
Description
Specifies the time interval between major tick marks.
Specifies whether minor ticks are displayed.
Specifies how to format the values for major tick marks.
Specifies the order of the tick values for a time axis as list.
INTERVAL=interval
specifies the time interval between major ticks. Valid interval keywords are AUTO, SECOND, MINUTE, HOUR, DAY, TENDAY, WEEK, SEMIMONTH, MONTH, QUARTER, SEMIYEAR, YEAR.
The data column(s) mapped to a time axis must be in the same duration units: TIME, DATE, or DATETIME. The selection of an interval must be consistent with the duration unit. For example, if the data are in time units, you can select only AUTO, SECOND, MINUTE, HOUR.
Default: AUTO. An appropriate interval is chosen based on the data and the column date/datetime/time format.
Interaction: This option is ignored if the TICKVALUELIST= option is used.
INTERVAL
Unit
Tick interval
Default tick value format
AUTO
DATE, TIME, or DATETIME
automatically chosen
automatically chosen
SECOND
TIME or DATETIME
second
TIME8.
MINUTE
TIME or DATETIME
minute
TIME8.
HOUR
TIME or DATETIME
hour
TIME8.
DAY
DATE or DATETIME
day
DATE9.
TENDAY
DATE or DATETIME
10 days
DATE9.
WEEK
DATE or DATETIME
7 days
DATE9.
SEMIMONTH
DATE or DATETIME
1st and 16th of each month
DATE9.
MONTH
DATE or DATETIME
month
MONYY7.
QUARTER
DATE or DATETIME
3 months
YYQC6.
SEMIYEAR
DATE or DATETIME
6 months
MONYY7.
YEAR
DATE or DATETIME
year
YEAR4.
MINORTICKS=Boolean
specifies whether minor ticks are displayed.
Default: FALSE
Interaction: The number of minor ticks is dependent on the value of the INTERVAL= option. For example, if INTERVAL=YEAR, there would be four minor ticks (1 per quarter).
Interaction: This option is ignored if the DISPLAY= option does not display tick marks, or if the TICKVALUELIST= option is used.
TICKVALUEFORMAT= format | DATA
specifies how to format the values for major tick marks.
Default: The default format used by the INTERVAL= option. The default does not apply if TICKVALUELIST= is specified.
format
A SAS date, time, or datetime format to control how the major tick values are displayed. This format must be in the same duration units as the data column(s) mapped to a time axis: TIME, DATE, or DATETIME and should be appropriate for the value of the INTERVAL= option. For example, if INTERVAL=MONTH and there are two years of data displayed on the axis, choosing TICKVALUEFORMAT=YEAR. would result in several ticks having the same year value.
DATA
Specifies that the SAS date, time, or datetime format associated with the data column assigned to the axis be used to control how the major tick values are displayed.
Restriction: GTL currently honors most but not every SAS format. For details, see SAS Formats Not Supported.
TICKVALUELIST=( time-constant-list | date-constant-list | datetime-constant-list | numeric-list )
specifies the tick values for a time axis as list.
Default: An internal algorithm determines the tick values.
Requirement: The list must be enclosed in parentheses and each item separated by a blank. The items in the list must be in the same duration units as the data mapped to the axis: TIME, DATE, or DATETIME. The values can be expressed as SAS TIME, DATE, or DATETIME constants (for example, "13:23"T, "11MAY06"D, or "11MAY06:13:23"DT) or their numeric equivalents.
Restriction: This option does not extend the data range of the axis. If the values fall within the default data range, they are used.
Interaction: The values in the list are formatted according to the setting for the TICKVALUEFORMAT= option. If TICKVALUEFORMAT= is not used, the values are formatted according to the column format (the default TICKVALUEFORMAT value is not applied to these values).