bwplot
.
panel.bwplot(x, y, box.ratio = 1, box.width = box.ratio / (1 + box.ratio), horizontal = TRUE, pch, col, alpha, cex, font, fontfamily, fontface, fill, varwidth = FALSE, notch = FALSE, notch.frac = 0.5, ..., levels.fos, stats = boxplot.stats, coef = 1.5, do.out = TRUE, identifier = "bwplot")
y
(x
) if horizontal
is TRUE
(FALSE
)box.ratio
. Useful for specifying thickness when the
categorical variable is not a factor, as use of box.ratio
alone cannot achieve a thickness greater than 1. bwplot
for a fuller
explanation.
pch="|"
is treated
specially, by replacing the dot with a line (similar to
boxplot
)
notch
is TRUE
, a notch is drawn in each
side of the boxes. If the notches of two plots do not overlap this
is strong evidence that the two medians differ (Chambers et
al., 1983, p. 62). See boxplot.stats
for the
calculations used. notch=TRUE
, the
fraction of the box width that the notches should use. boxplot.stats
,
that accepts a numeric vector and returns a list similar to the
return value of boxplot.stats
. The function must accept
arguments coef
and do.out
even if they do not use
them (a ...
argument is good enough). This function is
used to determine the box and whisker plot. stats
x
for every level of
y
(or the other way round if horizontal=FALSE
). By
default, the actual boxplot statistics are calculated using
boxplot.stats
. Note that most arguments controlling the
display can be supplied to the high-level bwplot
call directly.
Although the graphical parameters for the dot representing the median
can be controlled by optional arguments, many others can not. These
parameters are obtained from the relevant settings parameters
("box.rectangle"
for the box, "box.umbrella"
for the
whiskers and "plot.symbol"
for the outliers).
bwplot
, boxplot.stats
bwplot(voice.part ~ height, data = singer,
xlab = "Height (inches)",
panel = function(...) {
panel.grid(v = -1, h = 0)
panel.bwplot(...)
},
par.settings = list(plot.symbol = list(pch = 4)))
bwplot(voice.part ~ height, data = singer,
xlab = "Height (inches)",
notch = TRUE, pch = "|")
Run the code above in your browser using DataLab