Display Rotating Three Dimensional Scatterplots

DESCRIPTION:
Rotates multivariate data so that the three dimensional structure of the variables chosen can be perceived.

USAGE:
spin(x, collab=<<see below>>, highlight=rep(F, nrow(x)))

REQUIRED ARGUMENTS:
x:
a multivariate data matrix. Each row represents observations on one subject (a "case"); each column represents a variable (more than three columns are allowed). Missing values are not accepted.

OPTIONAL ARGUMENTS:
collab:
a character vector of names for the variables. The default is dimnames(x)[[2]], if present, or else the default is "var 1", "var 2", ...
highlight=:
a logical vector of length nrow(x) indicating which observations to highlight. Highlighting slows the spinning some, but is often worthwhile.

SIDE EFFECTS:
a rotating three dimensional scatterplot is displayed. If x has more than three columns, you may spin only three at a time, but it is easy to change your choice of the three active variables.

NOTE:
The only graphics devices on which this currently works are motif, openlook, X11, apollo (on an Apollo workstation only), or suntools (on a Sun workstation only).

DETAILS:
At the bottom of the screen is a line telling what happens if you press a button on the mouse. Nothing happens if no buttons are pressed.

SPINNING. To the right of the plot is a mouse-sensitive control panel. To choose the direction of spinning, place the cursor over one of "left", "right", "up", "down", or "circle" and press the left mouse button. As long as the button is held down, the plot will spin in the indicated direction.

CHANGING VARIABLES. A list of variable names lies at the bottom of the control panel. The three active variables are indicated by marks in the "x", "y" and "z" columns. To choose a new "x" variable, place the cursor in the "x" column in the row of the desired variable and press the left mouse button. The program will not allow the same variable for two axes; nor will it allow two variables to be assigned to the same axis. Whenever the spinning stops (release all buttons to stop it), the axes will be labeled with the variables assigned to them.

SPEED. To change the speed of the spinning, place the cursor in the "speed" panel where you wish the speed indicator to be and press the left button. The speed indicator will move and the spinning speed will change. The speed is actually controlled by changing the step size of the spinning, for bigger step sizes the accuracy of the approximation deteriorates and the the point cloud may deform after a while. This is a bug and may be fixed sometime.

RESIZING. Often as the plot rotates, parts of it disappear off the edges of the screen or all the points bunch up near the center. Clicking on the "bigger" or "smaller" boxes can be used to rescale the points. Each rescaling makes the plot 10% bigger or smaller.

PRINTING. To make a hardcopy of the current state of the plot, click the left mouse button over the "save" box. See printgraph for a description of the hard copy printing.

Note: hardcopy is currently only available under suntools.

QUITTING. To leave the program, click over the "quit" box.


REFERENCES:
Cleveland, W. S. and McGill, M. E., editors (1988). Dynamic Graphics for Statistics. Wadsworth & Brooks/Cole, Belmont, California.

SEE ALSO:
brush , Devices .

EXAMPLES:
spin(state.x77)
spin(my.data, highlight=rep(T, nrow(my.data)))