.-
help for ^onewplot^
.-

One-way plots -------------

^onewplot^ varlist [^if^ exp] [^in^ range] [ ^, st^ack ^f^rac^(^#^)^ graph_options ] ^onewplot^ varname [^if^ exp] [^in^ range] [ ^, by(^byvar^) st^ack ^f^rac^(^#^)^ graph_options ]

Description -----------

^onewplot^ plots data as a series of marks against a single magnitude axis.

The vertical scale is (implicitly) 1, ... , number of variables shown or, if ^by( )^ is specified, minimum value of byvar, ... , maximum value of byvar.

Remarks -------

^onewplot^ differs from ^graph, oneway^:

^graph, oneway^ puts descriptive text under each line of marks. ^onewplot^ puts descriptive text on the axes.

^graph, oneway^ always shows data marks as short vertical bars, unless ^jitter( )^ is specified. ^onewplot^ allows any symbol to be used for the data marks. The default is a short vertical bar, shorter than that in ^graph, oneway^.

^graph, oneway^ interprets ^jitter( )^ as replacing short vertical bars by sets of dots. ^onewplot^ interprets ^jitter( )^ in the same way as does ^graph,^ ^twoway^.

^graph, oneway^ does not allow tuning of ^xlabel( )^ -- the minimum and maximum are always shown -- nor of whether a border or axes are shown. ^onewplot^ allows such tuning as with ^graph, twoway^.

^onewplot^ uses only one colour in the body of the graph. ^graph, oneway^ uses several colours with several variables.

^onewplot^ allows the use of ^xline( )^ and ^yline( )^.

^graph, oneway^ allows up to 20 variables or 52 groups to be shown. ^onewplot^ allows up to 25 variables or groups to be shown.

^graph, oneway rescale^ stretches each set of data marks to extend over the whole horizontal range of the graph. ^onewplot^ allows the ^rescale^ option of ^graph, twoway^, but it has no effect, because internally the graph is of a single y-variable versus a single x-variable, and ^rescale^ only affects graphs with two or more y-variables. ^graph^ myvar^, oneway by(^byvar^)^ requires data to be sorted by byvar. ^onewplot^ myvar^, by(^byvar^)^ does not require this.

^graph^ myvar^, oneway by(^byvar^)^ does not take the values of byvar literally: displays for values 1, 2 and 4 will appear equally spaced. ^onewplot^ myvar^, by(^byvar^)^ does take the values of byvar literally. (To tidy up an ordering, use ^egen^ with ^lgroup^ from ^egenodd^ from STB-50.)

^onewplot^ with the ^stack^ option produces a variant on ^dotplot^ in which the magnitude axis is horizontal. There is no binning of data, unlike that in ^dotplot^.

Stata 6.0 will only use at most 8 characters from value labels in ^xlabel^s or ^ylabel^s. Options -------

^by(^byvar^)^ specifies that values of varname are to be shown separately by groups defined by byvar. This option may only be specified with a single variable. If ^stack^ is also specified, then note that distinct values of any numeric byvar are assumed to differ by at least 1. ^frac( )^ or the prior use of ^egen^ with ^lgroup^ from ^egenodd^ from STB-50 will fix any problems.

^stack^ specifies that data points with identical values are to be stacked, as in ^dotplot^, except that the magnitude axis is horizontal and there is no binning of data.

^frac(^#^)^ controls the fraction of vertical space taken up by stacked data points under the ^stack^ option above. Default 0.8. This option will not by itself change the appearance of a plot for a single variable or group of data.

graph_options are options allowed with ^graph, twoway^, other than ^xlabel^ by itself and ^ylabel^ by itself. ^yreverse^ may be useful.

The vertical scale may be extended by using ^yscale( )^.

^connect( )^ is allowed but not obviously useful. (For plots with connecting lines, see @parcoord@ from STB-29.)

Examples --------

. ^onewplot length width height^ . ^onewplot length, by(grade)^ . ^onewplot length, by(grade) border xla(0(200)2000)^

. ^onewplot mpg, by(foreign) stack f(0.4)^

Author ------

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

Also see --------

On-line: help for @groneway@, @parcoord@ (if installed), @egenodd@ (if installed), @dotplot@