SGSCATTER Procedure

MATRIX Statement

Creates a scatter plot matrix.
Creating a Scatter Plot Matrix

Syntax

MATRIX numeric-variable-1 numeric-variable-2 < ... numeric-variable-n> </ options>;

Summary of Optional Arguments

specifies a variable that is used to create data labels for each point in the plot.
adds graphs to the diagonal cells of the plot matrix.
Adds a confidence or prediction ellipse to each cell that contains a scatter plot.
specifies a classification variable to divide the values into groups.
specifies the appearance of the legend for the scatter plot.
specifies the appearance of the markers in the plot.
removes the legend from the graph.
specifies whether the diagonal starts in the top left corner or the bottom left corner.
specifies the degree of transparency for the plot components.

Required Argument

numeric-variable-1 numeric-variable-2 < ... numeric-variable-n >
specifies two or more numeric variables for the matrix.

Optional Arguments

DATALABEL= variable
specifies a variable that is used to create data labels for each point in the plot.
DIAGONAL= (graph-list)
adds graphs to the diagonal cells of the plot matrix. If you do not specify the DIAGONAL option, the diagonal cells contain the variable names.
graph-list can be one or more of the following:
HISTOGRAM
specifies a histogram.
KERNEL
specifies a kernel density estimate.
NORMAL
specifies a normal density curve.
ELLIPSE <= (options)>
Adds a confidence or prediction ellipse to each cell that contains a scatter plot.
options can be one or more of the following:
ALPHA= numeric-value
specifies the confidence level for the ellipse. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Default:.05
TYPE= MEAN | PREDICTED
specifies the type of ellipse. MEAN specifies a confidence ellipse for the population mean. PREDICTED specifies a prediction ellipse for a new observation. Both ellipse types assume bivariate normal distribution.
Default:PREDICTED
Interaction:The GROUP option does not affect the creation of ellipses. The SGSCATTER procedure always uses all of the data points to calculate the confidence or prediction ellipse.
GROUP= variable
specifies a classification variable to divide the values into groups. If a fit line is requested, then the GROUP= variable is also applied to the fit plot unless you specify the NOGROUP suboption in the option for the fit plot.
LEGEND= (options)
specifies the appearance of the legend for the scatter plot.
options can be one or more of the following:
ACROSS= n
specifies the number of columns in the legend.
DOWN= n
specifies the number of rows in the legend.
Interaction:If you specify both the ACROSS= and DOWN= suboptions, then the DOWN= suboption has no effect.
NOBORDER
removes the border from the legend.
NOTITLE
removes the label from the legend.
POSITION= position-value
specifies the position of the legend within the graph. The values are as follows:
BOTTOM
places the legend at the bottom of the graph.
LEFT
places the legend at the left side of the graph.
RIGHT
places the legend at the right side of the graph.
TOP
places the legend at the top of the graph.
Default:BOTTOM
Note:If you specify more than one legend with the same position, then all of your legends are placed at that position.
TITLE= "text-sting"
specifies the label for the legend. By default, the label of the group variable is used.
MARKERATTRS= style-element <(options)> | (options)
specifies the appearance of the markers in the plot. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can also specify suboptions to override specific appearance attributes.
options can be one or more of the following:
COLOR= color
specifies the color of the markers. You can specify colors using the same color schemes that are supported by SAS/GRAPH software. For more information, see Color-Naming Schemes in SAS/GRAPH: Reference.
Default:For ungrouped data, the default color is specified by the ContrastColor attribute of the GraphDataDefault style element in the current style. For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style.
SIZE= n <units>
specifies the size of the markers. You can also specify the unit of measurement. The default unit is pixels. For a list of measurement units that are supported, see Units of Measurement.
Default:The default marker size is specified by the MarkerSize attribute of the GraphDataDefault style element in the current style.
SYMBOL= symbol-name
specifies the symbol for the markers. For a list of valid marker symbols, see Marker Symbols.
Default:For ungrouped data, the default marker symbol is specified by the MarkerSymbol attribute of the GraphDataDefault style element in the current style. For grouped data, the default marker symbol is specified by the MarkerSymbol attribute of the GraphData1 ... GraphDatan style elements in the current style.
NOLEGEND
removes the legend from the graph.
START= BOTTOMLEFT | TOPLEFT
specifies whether the diagonal starts in the top left corner or the bottom left corner.
Default:TOPLEFT
TRANSPARENCY= numeric-value
specifies the degree of transparency for the plot components. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default:0.0