-------------------------------------------------------------------------------
help for scat3
-------------------------------------------------------------------------------

Crude 3-dimensional graphics

scat3 xvar yvar zvar [if exp] [in range] [, rotate(#) elevate(#) axistype(axis_type) axes(line_options) shadow[(scatter_options)] spikes(rspike_options) titlex([title_text][, marker_label_options]) titley([title_text][, marker_label_options]) titlez([title_text][, marker_label_options]) variablenames separate(varname) graph_options]

Description

scat3 draws (crude) 3-dimensional scatterplots. It is a port to Stata 8 of gr3 (Gould, 1991, 1993), itself partially broken since Stata 3.1 and dependent upon Stage for final editing. The 3-d graph consists by default of data points, spikes drawn from data points to the (x,y) plane, axes and axis titles.

Options

rotate(#) specifies the rotation angle in degrees (default 45).

elevate(#) specifies the elevation angle in degrees (default 45).

These are the angles at which the graph is projected onto your two-dimensional screen. You should try different values: the structure of your data may be better revealed by one angle rather than another. Good choices are:

Resolution of rotate() elevate() x y z ------------------------------------------------------ 30 60 good good adequate 45 45 adequate adequate adequate 60 30 poor poor excellent

axistype(axis_type) specifies the type of axes used. Choices are table, the default, "table-top" axes, outside, "outside" axes, zero, axes meeting at (0,0,0), and minimum, axes with origin the minimum of the data. The axistype may be specified by any abbreviation, down to one letter.

axes() tunes the representation of the axes (by default drawn with clp(solid)). It should contain options of twoway line.

shadow specifies that instead of vertical spikes from the data points to the (x,y) plane, each data point is paired with a shadow point on the (x,y) plane. shadow() specified with arguments tunes the representation of the shadow points (by default drawn with msize(*0.5)). It should contain options of twoway scatter.

spikes() tunes the representation of the spikes. It should contain options of twoway rspike.

titlex(), titley() and titlez() tune the representation of the x, y and z axis titles, shown as marker labels with default mlabpos(0) mlabcolor(black) and (in the case of the z axis title) mlabang(vertical). Each may contain title text and/or marker label options. The titles will be the text supplied; or if none is supplied, the variable labels of the variables concerned; or if those are not defined, the variable names.

variablenames overrides the option above by specifying the use of variable names.

separate() indicates that observations are to be subdivided into classes according to a specified variable. Each class is plotted as if it defined a single variable.

graph_options are options of twoway.

Examples

. scat3 weight length mpg

. scat3 length width wallht, rot(30) elev(60) axistype(z) titlez(, mlabang(0) mlabpos(9) mlabgap(*12)) titley(, mlabpos(7) mlabgap(*7)) title("Height, length and width of Cumbrian cirques", size(medium)) spikes(blw(vvthin)) ms(oh)

Author

Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

Acknowledgements

William Gould kindly condoned this revision of his earlier program. David Airey made a suggestion which led to the separate() option.

References

Gould, W. 1991. gr3: Crude 3-dimensional graphics. Stata Technical Bulletin 2: 6-8. (STB Reprints 1: 35-38)

Gould, W. 1993. gr3.1: Crude 3-dimensional graphics revisited. Stata Technical Bulletin 12: 12. (STB Reprints 2: 42-43)