As an example let's look a some data collected to examine the relationship between a phosphate absorption index and the amount of extractable iron and aluminum in a sediment (Devore and Peck [8, page 509, Example 6]). The data can be entered with the expressions
(def iron (list 61 175 111 124 130 173 169 169 160 224 257 333 199)) (def aluminum (list 13 21 24 23 64 38 33 61 39 71 112 88 54)) (def absorption (list 4 18 14 18 26 26 21 30 28 36 65 62 40))The expression
(spin-plot (list absorption iron aluminum))produces the plot on the left in Figure
![]() |
As a second example, with the data defined by
(def strength (list 14.7 48.0 25.6 10.0 16.0 16.8 20.7 38.8 16.9 27.0 16.0 24.9 7.3 12.8)) (def depth (list 8.9 36.6 36.8 6.1 6.9 6.9 7.3 8.4 6.5 8.0 4.5 9.9 2.9 2.0)) (def water (list 31.5 27.0 25.9 39.1 39.2 38.3 33.9 33.8 27.9 33.1 26.3 37.8 34.6 36.4))(Devore and Peck[8, Problem 12.18]) the expression
(spin-plot (list water depth strength) :variable-labels (list "Water" "Depth" "Strength"))produces a plot that can be rotated to produce the view in Figure
The function "2D spin-plot also accepts the additional keyword argument "2D scale. If "2D scale is "2D T, the default, then the data are centered at the midranges of the three variables, and all three variables are scaled to fit the plot. If scale is NIL the data are assumed to be scaled between -1 and 1, and the plot is rotated about the origin. Thus if you want to center your plot at the means of the variables and scale all observations by the same amount you can use the expression
(spin-plot (list (/ (- water (mean water)) 20) (/ (- depth (mean depth)) 20) (/ (- strength (mean strength)) 20)) :scale nil)
Rotation speed can be changed using the plot menu or the keyboard equivalents COMMAND-F for Faster and COMMAND-S for Slower.
Depth cuing and showing of the axes are controlled by the items on the plot menu.
If you click the mouse in one of the "2D Pitch, "2D Roll or "2D Yaw squares while holding down the shift key the plot will start to rorate and continue to rotate after the mouse button has been released.