Next: break
Up: MacAnova Help File
Previous: boxcox()
Contents
Usage:
boxplot(x1,x2,...,xk [,vs:indv, boxsize:W] [,vertical:T, excludeM:T,
boxtype:m, symbols:outlierSyms, graphics keyword phrases]), x1,...,xk
REAL vectors, indv REAL length k vector with no MISSING values, m > 0
integer, W REAL non-negative vector or scalar, outlierSyms CHARACTER
scalar or vector of length 2
boxplot(Struc, [,vs:indv, boxsize:W] [,vertical:T, excludeM:T,
boxtype:m, symbols:outlierSyms, graphics keyword phrases]), Struc a
structure with k REAL vector components
|
Keywords:
plotting, descriptive statistics
Usage
boxplot(x1, x2, ... , xk) produces horizontal parallel Tukey boxplots
for the vectors x1 through xk and plotting positions 1, 2, ..., k on the
y axis.
boxplot(x1, x2, ... , xk,vertical:T) and boxplot(Struc,vertical:T) do
the same except the boxplots are aligned vertically at plotting
positions 1, 2, ..., k on the x axis. Pre-defined macro vboxplot()
which is used identically to boxplot(), makes use of the feature to make
vertical boxplots.
boxplot(x1, x2, ..., xk, vs:Predictor [,vertical:T] ...) does the same
except the boxes are aligned with Predictor[1], Predictor[2], ...,
Predictor[k] on the y or x axis. Predictor must be a REAL vector with
no MISSING values with length(Predictor) = k.
boxplot(x1, x2, ..., xk, boxsize:W, ...) does the same except the
thickness of the boxes is determined by non-negative REAL scalar or
vector W. See below for details.
boxplot(x1, x2, ..., xk, boxtype:m, ...) does the same except the style
of the boxplot is determined by integer m > 0. The default type
corresponds to m = 1. Whiskers extend to the most extreme values inside
the inner "fences", and values beyond the inner and outer fences are
individually plotted with special symbols.
With boxtype:2, the box plot is a 5 number summary box plot, with
whiskers with cross bars at the end extending from the ends of the box
to the extremes. No outliers are indicated. At present, boxtype:m with
m > 2 yields as boxtype:1.
boxplot(Struc, ....) produces parallel box plots for the components of
structure Struc, all of which must be REAL vectors. You can use any
boxplot() or graphical keywords.
Keyword 'symbols'
Keyword 'symbols' has a different meaning from other plotting commands.
You use it to specify symbols for moderate outliers (beyond inner fences
and inside outer fences) and extreme outliers (beyond outer fences).
The value of 'symbols' must be a CHARACTER scalar or vector of length 2.
Cmd> boxplot(x1, x2, x3, symbols:vector("\3", "\5"))
uses "\3" (square) as a symbol for moderate outliers and "\5" (triangle)
as a symbol for extreme outliers. When the value of 'symbols' is a
scalar, the default symbol is used for extreme outliers.
Use with split()
boxplot(split(y,a) [,vertical:T] ... ) draws parallel box plots of the
data in vector y classified according to levels of factor a. See
split().
boxplot(split(y) [,vertical:T], ...) draws parallel box plots of the
data in each column of matrix y.
These work because split() returns a structure and each component of a
structure gets its own box.
Size of boxes
You can use keyword phrase boxsize:W, where W is a non-negative scalar
or vector to specify the "thickness" of the boxes (height for horizontal
boxes, width for vertical boxes). When W is not a scalar, length(W)
must match the number of boxes. When W is a vector and W[j] = 0, box j
is omitted.
When you don't use keyword 'boxsize', the default thickness is such that
about 2/3 of the space between the first and last box is made of up
boxes and 1/3 of interbox space.
Keywords
When keyword phrase 'excludeM:T' is an argument, and the number of
non-MISSING values in a sample is odd, the median is omitted in
calculating the quartiles as the medians of the upper and lower halves.
You may use keywords 'dumb', 'xmin', 'xmax', 'ymin', 'ymax', 'logx',
'logy', 'xlab', 'ylab', 'title', 'xaxis', 'yaxis', 'borders', 'ticks',
'xticks', 'yticks', 'xticklen', 'yticklen', 'xticklabs', 'yticklabs',
'height', 'width', 'pause', 'silent' and 'notes' as for other plotting
commands. See topics 'graph_keys', 'graph_border' and 'graph_ticks'
When option 'dumbplot' has been set False (see subtopic
'options:"dumbplot"'), the plot will be a low resolution plot unless
'dumb:F' is an argument.
Note: Using 'logx:T' and/or 'logy:T' affects only the scaling used in
plotting, not the determination of outliers. With logy:T without
vertical:T or logx:T with vertical:T`q, the thickness of the boxes will
be affected since the edges are equally distant from the middle in
arithmetic units but not in logarithmic units
Cross references
See topic 'graph_files' for information on how to save a boxplot in a
file using keywords 'file', 'new, 'ps', 'screendump', and 'epsf'.
See also topics showplot(), 'structures', 'graph_keys'.
Gary Oehlert
2005-08-12