bxp(z, width=<<see below>>, varwidth=F, notch=F, style.bxp=list(),
boxwex=.5, boxcol=3, medchar=F, medpch=NA, medline=T, medlwd=5,
medcol=0, confint=F, confcol=2, confangle=45, confdensity=25,
confnotch=F, whisklty=2, staplelty=1, staplewex=1, staplehex=1,
outchar=F, outpch=NA, outline=T, outwex=1, ...)
boxplot but can be built up in any other
way. See
boxplot for a description of the necessary components of
z.
TRUE, variable width boxes are drawn proportional to the
square root of
z$n.
TRUE, use the
z$conf to produce notched boxplots.
(NOTE: The
notch parameter is provided primarily for backward compatibility.
See the
confint,
confnotch,
confcol,
confangle and
confdensity
parameters below for more versatile control of the displaying of confidence
intervals.)
bxp." to get the name of a dataset which is a list. Component
names of this list should match the names of the parameters below; the
component values serve as the defaults for the corresponding
parameters (i.e., other arguments supplied to the function
override the
style.bxp component values). Standard
style.bxp option values
include
"splus" (new S-PLUS style),
"att" (new AT&T style) and
"old".
0.5, but the
"att" and
"old" styles
set this to
1.
col is not specified,
boxcol will be used (see below). The
col argument can be specified as a single color value or a vector of color values. For example, col="blue" fills the box with the specified color, and col=1:3 can be used to fill multiple boxes using a vector of three colors.
0 can be used
to designate filling with the background color. A specification of
boxcol=-1
is used to designate "no fill" at all. The default is to fill with color
3,
but the
"att" and
"old" styles set this for no filling.
TRUE if a
medpch parameter is
supplied. The default is
FALSE, but the
"att" style implicitly
sets the default to
TRUE (by specifying
medpch).
medchar parameter to be
TRUE. The special value,
NA, can be
used to indicate the current plotting character (
par("pch")).The
default is
NA, but the
"att" style set the default to
16 (filled
octagon).
TRUE if the
medlwd
parameter is supplied. The default is
TRUE, but the
"att" style
sets it to
FALSE.
medline parameter to
TRUE. The special value,
NA, is used to
indicate the current line width (
par("lwd")). The default is
5,
but the
"old" and
"att" styles set the it to
5.
NA,
indicates the current plotting color (
par("col")). The default is
0
(the background color), but the
"old" and
"att" styles set the
default to
NA.
TRUE, use
z$conf to display confidence
intervals. How the confidence intervals are shown is determined by the
confnotch,
confcol,
confangle and
confdensity parameters.
TRUE, confidence
intervals will be notched. The default is
FALSE, but the
"old"
and
"att" styles set this parameter to
TRUE.
2, but the
"old"
and
"att" styles set it to -1 (no filling).
confdensity
is supplied and
confangle is not,
confangle defaults to
45.
confangle is
supplied and
confdensity is not,
confdensity defaults to
25.
NA, indicates the current
line type (
par("lty")). The default is
2 (dotted line), but the
"old" and
"att" styles set it
to
4 (dashed line).
NA,
indicates the current line type (
par("lty")). The default is
1
(solid line), but the
"att" style sets the default to
4 (dashed
line).
1, but the
"old" style sets the default to
0.125.
1 but the
"old"
style sets the default to
0.
TRUE if an
outpch parameter is
supplied. The default is
FALSE, but the
"old" style sets it
to
TRUE, and the
"att" style implicitly sets it to
TRUE (by
setting
outpch).
outchar parameter to be
TRUE. The special value,
NA,
indicates the current plotting character (
par("pch")). The default
is
NA, but the
"att" style sets the default to
1 (an octagon).
TRUE if the
outwex parameter is
supplied. The default is
TRUE, but the
"old" and
"att" styles
set it to
FALSE.
1.
bxp will always use linear axes: the
log and
[xy]axt arguments
are ignored.
Outlier lines and points are always drawn in color 1 of the palette.
This function is called by
boxplot.
# Save boxplot statistics by specifying "plot=F"
lottery.boxplot <- boxplot(split(lottery.payoff,
lottery.number%/%100), plot=F)
# Plot boxplots and save x-axis coordinates
lottery.bxp <- bxp(lottery.boxplot)
# Add counts to plot
text(paste("n=", lottery.boxplot$n, sep=""),
x=lottery.bxp, y=0.85*min(lottery.payoff))