Previous Page | Next Page

The G3D Procedure

Concepts


G3D Procedure Terms

The following illustration provides the terminology used to describe the elements of the three-dimensional plots generated with G3D.

Elements of a Three-Dimensional Plot

[g3d procedure terminology]


The Input Data Set

The G3D procedure requires three numeric variables to produce a plot. The input data set forms a rectangular grid from the values of X and Y. One value of Z is required for each X-Y grid location. If multiple observations have the same Z value for any X-Y combination, only the last observation is plotted.

Note:   The Java and ActiveX drivers support multiple points with identical X-Y combinations.  [cautionend]


Data for Surface Plots

The G3D procedure requires non-missing Z values for at least 50 percent of the grid cells. When the procedure cannot produce a satisfactory surface plot because of missing Z values, a warning message is issued and a graph might not be produced. To correct this problem, you can grid the data set with the G3GRID procedure. The G3GRID procedure interpolates the necessary values to produce a data set with non-missing Z values for every X-Y combination. The G3GRID procedure can also smooth data for use with the G3D procedure. The output data set produced by the G3GRID procedure can be used as the input data set for the G3D procedure. See The G3GRID Procedure for more information.


Data for Scatter Plots

In order to properly scale the axes, the G3D procedure requires at least two observations. These observations must contain unique values for each of the three variables that are specified in the plot request. If these requirements are not met, an error message is issued, and a graph is not produced.


Changing Data Ranges

For both surface plots and scatter plots, the range of the Z axis is defined by the minimum and maximum data values for Z. To increase or decrease the range of the Z axis, you can use the ZMIN= option and the ZMAX= option in the PLOT or SCATTER statements. To restrict the range of an X axis or a Y axis, you can use a WHERE clause in the PROC step to subset the data. A DATA Step with a WHERE clause, or an IF statement can also be used to subset the data.

Note:   See the SCATTER Statement for information on controlling axis labels and tick mark values with SCATTER statement options.  [cautionend]


Rotating and Tilting the Plot

For both surface plots and scatter plots, you can rotate the X-Y plane around the Z axis, or tilt the X-Y plane toward you. When you rotate a plot, you can view data from any angle around the three-dimensional graph. Rotating a plot is useful for bringing into view data points that might be obscured by other data points. Tilting a plot enables you to accentuate the location of data points.

The following diagram illustrates how the TILT= option, and the ROTATE= option change the viewing angles of a plot.

Rotating and Tilting a Plot

[g3d rotate and tilt diagram]

Note:   Certain combinations of the TILT= option, and the ROTATE= option can cause the tick mark values to overlap.  [cautionend]


Controlling the Axes

Because the relationship between a plot's surface and the actual data values can be difficult to interpret, the readability of the plot can be enhanced by; changing the number of tick marks on the axes, or restricting the vertical axis range.

The G3D procedure supports AXIS definitions for Java and ActiveX only; however, you can use the functionality of PLOT and SCATTER statements to:

The font and height of the graph's text can be changed with the GOPTIONS FTEXT= option and the GOPTIONS HTEXT= option, respectively. The GOPTIONS FBY= option can be used to specify the font for the BY-labels for BY-group graphs.

Previous Page | Next Page | Top of Page