.BG
.FN scatmat
.TL
Brushing a Scatterplot Matrix
.CS
scatmat(data, names, labels, scale)
.AG data
matrix of data to be displayed.
Each row represents an observation, each column
a variable.
.AG names
character vector giving the names of the variables, i.e.,
columns of `data'.  Default is "Var 1", ....
.AG labels
character vector giving labels for the observations.
Default is the observation numbers:
`encode(seq(nrow(data)))'.
.AG scale
logical flag, to determine if the columns of `data'
should be scaled prior to plotting.
Default `TRUE'.
If `scale' is `FALSE', it is assumed that all values in
`data' are already scaled to be between 0 and 1.
.RT
a category describing the final displayed status of
each observation.
Each observation will be marked "Normal", "Highlighted", "Labelled",
or "Deleted".
This value will not be printed automatically, but can be assigned
a name and saved in a dataset.
.PP
The function displays a matrix of scatter plots on the screen
and has a rectangular brush that tracks movement of the mouse.
As the brush moves in the current plot (the subplot with a dark
border around it), all of the observations within the brush are
highlighted (or deleted or labelled, depending on the current operation).
In addition, the operation is also carried out on the
selected observations on all other plots in the scatterplot matrix.
The diagonal elements of the scatterplot matrix contain the
variable names as well as minimum/maximum values taken on by the
variable.
.PP
All control over the display is carried out by the mouse.
Mouse button 1 is used to (a) select a current plot and
(b) make lock-in the effect of the current brush operation.
Button 2 undoes the effect of the current operation, providing
a way of undoing the work done using button 1.
Button 3 produces a pop-up menu that allows selection of operations.
Selecting "Highlight", "Delete" or "Label" causes that to
become the current operation.
Asterisks appear on the
menu next to the current operation.
.PP
"Locate" allows the user to repeatedly scan through a menu of the
observation labels and have the selected observations operated upon.
The menu comes up when button 3 is pressed.
Locate mode is terminated when no selection is made from the label menu.
.PP
"Rescale" will redraw the plots after rescaling the data to take
account of the deleted points.  After doing this operation,
the deleted points are no longer available.
.PP
"Shadow" provides an inverted display in all but the current window.
It is useful for looking at subsets of the data.
.PP
"Pause" allows the user to suspend the interaction and do other
operations on the terminal (particularly `blitblt' to make copies
of the current screen image).
"Exit" will wait for a confirming press of button 3 before exiting
the program.
.PP
The `scatmat' function can only be used with a Teletype 5620 or
AT&T 630 terminal.
.SH REFERENCE
Richard A. Becker and William S. Cleveland,
"Brushing Scatterplots"
.ul
Technometrics,
Vol 29, No 2, pp 127-142, 1987.
.EX
scatmat(state.x77,names=state.col77,labels=state.name)
.KW hplot
.KW iplot
.WR
