Example Program and Statement Details

Example Graph

The following graph was generated by the Example Program:
Example 3-D Graph

Example Program

proc template;
  define statgraph layoutoverlay3d;
    begingraph;
      entrytitle "Density Plot of Height and Weight";
      layout overlay3d / tilt=10  rotate=54
                         walldisplay=none cube=false;
        surfaceplotparm x=height y=weight z=density /
          surfacecolorgradient=density;
      endlayout;
    endgraph;
  end;
run;
proc sgrender data=sashelp.gridded template=layoutoverlay3d;
run;

Statement Summary

The LAYOUT OVERLAY3D statement builds a 3-D composite using one or more GTL-statements. You can specify one or more 3-D plots within the layout, provided all plots can share the same type of axes. You can also specify “annotations” (for example, with one or more ENTRY statements or LAYOUT GRIDDED statements). However, annotations in the OVERLAY3D layout are more likely to collide with other graphics features than are annotations in other overlay-type layouts.
As an overlay-type layout, OVERLAY3D has the same behavioral characteristics as an OVERLAY layout. It uses the same general logic for rendering the composite (see LAYOUT OVERLAY Statement for details), and its default axis characteristics are generally determined by the first specified plot, unless you use PRIMARY=TRUE on another plot statement (see When Plots Share Data and a Common Axis).
Within an OVERLAY3D layout, a graph’s bounding cube can be tilted, rotated, and zoomed to provide a different viewpoint. By default, the outline of the bounding cube is displayed and the viewing rotation angle is 57 degrees, the tilt angle is 20 degrees, and the zoom factor is 1. See the CUBE=, ROTATE=, TILT=, and ZOOM= options for information about how to change the viewpoint.

Options

Statement Option
Description
Specifies the color of the layout background.
Specifies whether a border is drawn around the layout.
Specifies the properties of the border line.
Specifies whether the layout displays the lines that indicate the complete bounding cube of the axis planes.
Specifies whether the default visual attributes of lines and fills in nested plot statements automatically change from plot to plot.
Specifies whether the layout background is opaque.
Specifies the amount of extra space that is added inside the layout border.
Specifies the angle of rotation in degrees.
Specifies the angle of tilt in degrees.
Specifies the fill color of the plot’s walls.
Specifies whether the plot’s walls and wall outlines are displayed.
Specifies one or more X axis options.
Specifies one or more Y axis options.
Specifies one or more Z axis options.
Specifies a zoom factor.
BACKGROUNDCOLOR=style-reference | color
specifies the color of the layout background.
Default: The GraphBackground:Color style reference.
style-element
A reference in the form style-element:style-attribute. Only the style-attribute named COLOR is used.
Interaction: OPAQUE=TRUE must be in effect for the color to be seen. By default, OPAQUE=FALSE.
BORDER=boolean
specifies whether a border is drawn around the layout.
Default: FALSE
BORDERATTRS=style-element | style-element (line-options) | (line-options)
specifies the attributes of the border line around the layout. See General Syntax for Attribute Options for the syntax on using a style-element and Line Options for available line-options.
Default: The GraphBorderLines style element.
Interaction: BORDER=TRUE must be set for this option to have any effect.
CUBE=boolean
specifies whether the layout displays the lines that indicate the complete bounding cube of the axis planes.
Default: TRUE
The color, thickness, and pattern of the cube lines are determined by the GraphAxisLines style element.
The cube lines are displayed independently of the wall borders and axis lines. Because some cube lines coincide with wall borders and axis lines, it might appear that turning off wall borders or axis lines has no effect when CUBE=TRUE.
CYCLEATTRS=boolean
specifies whether the visual attributes of lines and fills in nested plot statements automatically change from plot to plot. See Cycling through Group Attributes in Overlaid Plots for more information.
Default: FALSE
FALSE
does not cycle the default visual attributes of multiple plots. For example, if you overlay two surface plots, each surface has the same visual properties.
TRUE
the system looks at the plots in the layout and tries to use the GraphData1 - GraphDataN style elements to assign different visual properties to the plots. For example, if you overlay two surface plots, the two surfaces receive different visual properties. These default properties are determined by the next GraphDataN style element not already used.
OPAQUE= boolean
specifies whether the layout background is opaque (TRUE) or transparent (FALSE).
Default: FALSE
Interaction: When this option is set to FALSE, the background color is not used.
PAD=dimension | (pad-options)
specifies the amount of extra space that is added inside the layout border.
Default: The default padding for all sides is 0. Values without units are in pixels (px). A unit must be provided if other than pixels.
dimension
Specifies a dimension to use for the extra space at the left, right, top, and bottom of the layout border.
(pad-options)
Enables separate settings for the left, right, top, and bottom padding dimensions. Use the pad-options to create non-uniform padding. These options must be enclosed in parentheses. Each option is specified as a name = value pair. Sides not assigned padding are padded with the default amount.
Values without units are in pixels (px). A unit must be provided if other than pixels.
LEFT=dimension specifies the amount of extra space added to the left side.
RIGHT=dimension specifies the amount of extra space added to the right side.
TOP=dimension specifies the amount of extra space added to the top.
BOTTOM=dimension specifies the amount of extra space added to the bottom.
ROTATE=number
Specifies the angle of rotation. Rotation is measured in a clockwise direction about a virtual axis parallel to the Z axis (vertical) and passing through the center of the bounding cube. A counterclockwise rotation can be specified with a negative value.
Default: 54
TILT=number
Specifies the angle of tilt in degrees. Tilt is measured in a clockwise direction about a virtual axis parallel to the X axis (vertical) and passing through the center of the bounding cube. A counterclockwise rotation can be specified with a negative value.
Default: 20
WALLCOLOR=style-reference | color
specifies the fill color of the plot’s walls.
Default: The GraphWalls:Color style reference.
style-reference
A reference in the form style-element:style-attribute. Only the style- attribute named COLOR is used.
Interaction: This option is ignored if WALLDISPLAY=NONE or WALLDISPLAY=(OUTLINE).
WALLDISPLAY= STANDARD | ALL | NONE | (display-options)
specifies whether the plot’s walls and wall outlines are displayed.
Default: STANDARD
STANDARD
Displays an outlined wall. The setting of the FRAMEBORDER= ON | OFF attribute of the GraphWalls style element determines whether the wall outline is displayed.
ALL
Displays a filled, outlined wall.
NONE
Displays no wall fill, no wall outline.
(display-options)
A list of options, enclosed in parentheses, that must include one of the following:
OUTLINE displays the wall outline.
FILL displays the plot wall.
Use the WALLCOLOR= option to control the color of the wall.
Also see the CUBE= option.
XAXISOPTS= (axis-options)
specifies one or more X axis options. For a list of options, see Axis Options for LAYOUT OVERLAY3D.
Requirement: Axis options must be enclosed in parentheses and separated by spaces.
YAXISOPTS= (axis-options)
specifies one or more Y axis options. For a list of options, see Axis Options for LAYOUT OVERLAY3D.
Requirement: Axis options must be enclosed in parentheses and separated by spaces.
ZAXISOPTS= (axis-options)
specifies one or more Z axis options. For a list of options, see Axis Options for LAYOUT OVERLAY3D.
Requirement: Axis options must be enclosed in parentheses and separated by spaces.
ZOOM= positive-number
specifies a zoom factor. Factors greater than 1 move closer to the bounding cube, less than 1 move farther away
Default: 1