Chapter 46: The G3D Procedure


Overview

The G3D procedure produces three-dimensional graphs that plot one vertical variable (z) for a position on a plane that is specified by two horizontal variables (x and y). The coordinates of each point correspond to the values of three numeric variable values in an observation of the input data set. The observation may contain values in the form y=f(x, y) or independent values such as the altitude at a given longitude and latitude. With the G3D procedure you can generate surface graphs with the PLOT statement or scatter plots with the SCATTER statement.

About Surface Plots

Surface plots show the three-dimensional shape of your data and are useful for examining data trends. The plots represent the shape of the surface that is described by the values of two horizontal variables, x and y , and a third vertical variable, z . The values of the horizontal variables are plotted on x and y axes, which form a horizontal plane. The values of the vertical variable are plotted on a z axis, rising above that plane to form a three-dimensional surface.

Figure 46.1 on page 1296 shows an example of a surface plot that uses all default settings for the plot. The axes are scaled to include the maximum and minimum values for each of the plotted variables x , y , and z . Each variable s value range is divided into three even intervals, which form the major axes tick marks, and the axes are labeled with the names of the plotted variables or associated labels. The horizontal plane formed by the x and y axes is rotated 70 around the z axis and also tilted 70 toward you, and the plot is colored with the colors that are defined in the current colors list.

click to expand
Figure 46.1: Sample G3D Surface Plot

The program for this plot is shown in Example 1 on page 1314. For more information on producing surface plots, see PLOT Statement on page 1301.

About Scatter Plots

Scatter plots are three-dimensional plots that are similar to surface plots, but they represent the data as points instead of surfaces. Scatter plots show trends or concentrations in the data by classifying the data by size , color , shape, or a combination of these features. As with surface plots, the values of the x and y variables in scatter plots form a horizontal plane, and the values of the z variable rise above that plane. Rather than forming a surface, however, the values of the z variable are represented as individual symbols that can be optionally connected to the horizontal plane with lines called needles .

Figure 46.2 on page 1297 shows a simple scatter plot. As with surface plots, default settings for scatter plots scale the axes to include the maximum and minimum values for each of the plotted variables x , y , and z , and divide each variable s value range into three even intervals to form the major axes tick marks. Default settings also rotate the horizontal plane 70 around the z axis and tilt it 70 toward you, label each axis with the name of the plotted variable or an associated label, and color the plot with colors that are defined in the current colors list. The default settings also add reference lines to the horizontal plane to mark the major x and y axes tick marks, and represent each data point with a pyramid, which is connected to the horizontal plane with a needle.

click to expand
Figure 46.2: Sample G3D Scatter Plot

The program for this plot is shown in Example 4 on page 1318. For more information on producing scatter plots, see SCATTER Statement on page 1305.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net