SCATTERPLOT Subcommand (GRAPH command)
SCATTERPLOT produces two- or three-dimensional scatterplots. Multiple two-dimensional
plots can be plotted within the same frame or as a scatterplot matrix.
Only variables can be specified; aggregated functions cannot be plotted.
When SCATTERPLOT is specified
without keywords, the default is BIVARIATE.
BIVARIATE. One two-dimensional
scatterplot. A basic scatterplot is defined by two variables
separated by the keyword WITH. This is the default when SCATTERPLOT is specified without keywords.
OVERLAY. Multiple plots
drawn within the same frame. Specify a variable list
on both sides of WITH. By default,
one scatterplot is drawn for each combination of variables on the
left of WITH with variables
on the right. You can specify PAIR in parentheses to indicate that the first variable on the left is
paired with the first variable on the right, the second variable on
the left with the second variable on the right, and so on. All plots
are drawn within the same frame and are differentiated by color or
pattern. The axes are scaled to accommodate the minimum and maximum
values across all variables.
MATRIx. Scatterplot matrix. Specify at least two variables. One scatterplot is drawn for each combination of the specified variables above the diagonal and a second below the diagonal in a square matrix.
XYZ. One three-dimensional
plot. Specify three variables, each separated from the
next with the keyword WITH.
- If you specify a control variable using
BY,GRAPHproduces a control scatterplot where values of theBYvariable are indicated by different colors or patterns. A control variable cannot be specified for overlay plots. - You can display the value label of an identification
variable at the plotting position for each case by adding
BYvar(NAME)orBYvar(IDENTIFY)to the end of any valid scatterplot specification. When the chart is created,NAMEturns the labels on, whileIDENTIFYturns the labels off. You can use the Point Selection tool to turn individual labels off or on in the scatterplot.