Previous Page | Next Page

The G3D Procedure

PLOT Statement


Creates three-dimensional surface plots using values of three numeric variables from the input data set.
Requirements: One plot request is required.
Global statements: AXIS, BY, FOOTNOTE, GOPTIONS, NOTE, TITLE
Reminder: The procedure can include the FORMAT, LABEL, and WHERE statements.
Restriction: The AXIS statement is partially supported by the Java and ActiveX devices only.


Description

The PLOT statement specifies one plot request that identifies the three numeric variables to plot. The statement also does the following actions:

In addition to the Global statement options, the following Plot statement options enable you to specify the appearance of many of the plot's elements.


Syntax

PLOT y*x=z </option(s)>;

Option(s) can be one or more options from any or all of the following categories:


Required Arguments

y*x=z;

specifies the three numeric variables from the input data set:

Y

is the horizontal variable whose values are plotted on the Y axis

X

is the horizontal variable whose values are plotted on the X axis

Z

is the vertical variable whose values are plotted on the Z axis


Options

Options in a PLOT statement affect all graphs that are produced by that statement. You can specify as many options as you want, and list them in any order.

ANNOTATE=annotate-data-set

specifies an annotate data set to annotate plots that are produced by the PLOT statement.

Alias: ANNO=
See also: Using Annotate Data Sets
CAXIS=axis-color

specifies a color for all the axes lines and tick marks.

Style reference: Color attribute of the GraphAxisLines element
Restriction: The AXIS statement is partially supported by Java and ActiveX. If the AXIS statement specifies general axis colors with the COLOR= option; the CAXIS= option overrides the AXIS statement general COLOR= option.
CBOTTOM=bottom-surface-color

specifies a color for the bottom of the plot surface.

Style reference: Color attribute of the GraphData2 element
Restriction: Not supported by Java
CTEXT=text-color

specifies a color for the axis labels and axis tick mark values. The G3D procedure uses the first color it finds from the following list:

  1. colors specified for labels and values on assigned AXIS statements, which override the CTEXT= option on the PLOT statement. (Colors specified on AXIS statements are supported by the Java and ActiveX devices only.)

  2. the color specified by the CTEXT= option in the PLOT statement

  3. the color specified by the CTEXT= option in a GOPTIONS statement

  4. the color specified in the current style, or the first color in the color list for all of the other devices

if the NOGSTYLE system option is specified, the CTEXT= option color is assigned as follows:

  • for the Java and ActiveX devices the default color is black

  • for all other devices, the first color in the device's color list

Note:   If you use a BY statement in the procedure, the color of the BY variable label is controlled by the CBY= option in the GOPTIONS statement.  [cautionend]

Note:   For Java and ActiveX, specific text options specified in the AXIS statement override the CTEXT= option.  [cautionend]

Style reference: Color attribute of the GraphValueText and the GraphLabelText elements
CTOP=top-surface-color

specifies a color for the top of the plot surface.

Style reference: Color attribute of the GraphData1 element
Featured in: Generating a Rotated Surface Plot
DESCRIPTION="description"

specifies the description of the plot. The maximum length for description is 256 characters.

The descriptive text is displayed as follows:

  • the description in the Results window

  • the description in the Explorer view of the catalog entry

  • the description field of the PROC GREPLAY window

  • the ALT= text in the HTML file when the output destination is ODS HTML

  • customized by inserting BY variable values with #BYLINE, #BYVAL(n), and #BYVAR(n)

Alias: DES=
Default: 3D surface plot of z by x and y
See also: Substituting BY Line Values in a Text String
Restriction: Partially supported for ActiveX and Java
GRID

draws reference lines at the major tick marks on all axes.

Featured in: Generating a Rotated Surface Plot.
Restriction: Not supported by Java
NAME="name"

specifies the name of the GRSEG catalog entry, and the name of any graphics output file created. The name can be up to 256 characters long. If the name duplicates an existing name, SAS/GRAPH adds a number, or increments the last number used to create a unique graph name-for example G3D1.

For GRSEG entries:

  • the name is truncated to eight characters

  • the first character is always represented in upper case

  • all other characters are represented in lower case

  • periods and blanks are converted to underscores

For Graphics Output files:

  • SAS/GRAPH adds a number to the NAME= value, or increments the last number used.

Default: Procedure name
See also: About Filename Indexing
NOAXIS

specifies that the plot has no axes, axes labels, or tick mark values. Use this option if you want to generate axis labels and tick mark values with an annotate data set, or with the AXIS statement for Java and ActiveX.

Alias: NOAXES
NOLABEL

specifies that the plot has no axis labels or tick mark values. Use this option if you want to generate axis labels and tick mark values with an annotate data set, or with the AXIS statement for Java and ActiveX.

ROTATE=angle-list

specifies one or more angles at which to rotate the X-Y plane around the perpendicular Z axis. Specify the values in degrees. The values specified in the angle-list can be negative or positive. If you specify a sequence of angles, separate graphs are produced for each angle. The angles that are specified in the ROTATE= option are paired with any angles that are specified with the TILT= option. If one option contains fewer values than the other, the last value in the shorter list is paired with the remaining values in the longer list. The angle-list list is in one of the following forms:

  • an explicit list of values: n <...n>

  • a starting and an ending value with an interval increment: n TO n <BY increment>

  • a combination of both forms: n <...n> TO n <BY increment > <n <...n> >

Default: 70 degrees
Featured in: Generating a Rotated Surface Plot
Restriction: Not supported by ActiveX
SIDE

produces a surface graph with a side wall.

Featured in: Generating a Tilted Surface Plot
Restriction: Partially support by Java
TILT=angle-list

specifies one or more angles to tilt the graph toward you. The values must be specified in degrees. The valid values specified in the angle-list are 0 through 90. To generate a sequence of graphs, specify multiple angles, a graph is generated for each angle. The angles that are specified in the TILT= option are paired with any angles that are specified in the ROTATE= option. If one option contains fewer values than the other, the last value in the shorter list is paired with the remaining values in the longer list. The angle-list is in one of the following forms:

  • an explicit list of values: n <...n>

  • a starting and an ending value with an interval increment: n TO n <BY increment>

  • a combination of both forms: n <...n> TO n <BY increment > <n <...n> >

Default: 70 degrees
Featured in: Generating a Tilted Surface Plot
XAXIS= AXIS<1...<99>

assigns an axis definition.

Restriction: Partially supported by Java and ActiveX only
XTICKNUM=number-of-major-tick-marks

specifies the number of major tick marks that are located on a plot's x axis. At least two values are needed to generate the axis.

Default: 4 (except Java and ActiveX are 5)
Restriction: Not supported by Java and ActiveX
XYTYPE=0 | 1 | 2 | 3

specifies the direction of lines that are used to represent the plot's surface. Both X and Y are displayed by default. The valid values for the XYTYPE= option are as follows:

  1. XYTYPE=0 (Java and ActiveX only) No lines are displayed. The plot is displayed as a solid surface.

  2. XYTYPE=1 draws lines that are parallel to the X axis. The surface is displayed by using lines that represent Y axis values.

  3. XYTYPE=2 draws lines that are parallel to the Y axis. The surface is displayed by using lines that represent X axis values.

  4. XYTYPE=3 draws lines that are parallel to both the X and Y axes. Displays the surface by using lines that represent values for both X and Y.

Featured in: Changing the Surface Appearance
Restriction: Not supported by Java
YAXIS=AXIS <1...<99>

assigns an axis definition.

Restriction: Partially supported by Java and ActiveX only
YTICKNUM=number-of-major-tick-marks

specifies the number of major tick marks that are located on a plot's Y axis. At least two values are needed to generate the axis.

Default: 4 (except Java and ActiveX are 5)
Restriction: Not supported by Java
ZAXIS= AXIS<1...<99>

assigns an axis definition.

Restriction: Partially supported by Java and ActiveX only
ZMAX=maximum-axis-value

specifies the maximum value that is displayed on a plot's Z axis. Defining the ZMAX= option value greater than the data that is in the input data set, extends the plot's Z axis. Defining the ZMAX= option value less than the maximum value in the input data set displays all Z values in the range of ZMIN-to-ZMAX, and might cause data clipping.

The value of the ZMAX= option must be greater than the value of the ZMIN= option.

Default: The maximum value of the Z variable
Featured in: Generating a Rotated Surface Plot
Restriction: Not supported by Java

ZMIN=minimum-axis-value

specifies the minimum value that is displayed on a plot's Z axis. Defining the ZMIN= option value less than the minimum value in the input data set extends the plot's Z axis. Defining the ZMIN= value greater than the minimum value in the input data set displays all Z values in the range of ZMIN-to-ZMAX, and might cause data clipping.

The value of the ZMIN= option must be less than the value of the ZMAX= option.

Default: The minimum value of the Z variable
Featured in: Generating a Rotated Surface Plot
Restriction: Not supported by Java
ZTICKNUM=number-of-major-tick-marks

specifies the number of major tick marks that are located on a plot's Z axis. At least two values are needed to generate the axis.

Default: 4 (except ActiveX is 5)
Restriction: Not supported by Java

Changing the Surface Appearance

The XYTYPE= option specifies the direction of the lines that form the surface plot. The following plots show examples of each type of plot surface.

Surface Appearance for XYTYPE=1

[g3d surface with xytpe=1 option]

Surface Appearance for XYTYPE=2

[g3d surface plot with xytpe=2 option]

Surface Appearance for XYTYPE=3

[g3d surface with xytype=3]

Previous Page | Next Page | Top of Page