Description Usage Arguments Details Author(s) See Also Examples
Box plots with added stripplots, densityplots, mean/stderr marker etc.
1 2 3 4 5 6 7 |
x |
the data, as in |
y |
the number of the box, as in |
groups |
a factor indicating a partitioning of the data |
subscripts |
Argument internally used by Lattice to realize the
|
pch |
A integer vector, character vector or list that indicates the value
to be used as pch (plot character) for the stripplot for each level of
|
col |
Analogous to pch, but indicating color.
Integers indicate color numbers, strings indicate color names, both
can be mixed in the comma-separated string format.
Defaults to all |
box.ratio |
Like in panel.bwplot, but the different default value withstands the call default of 1 that is imposed by Lattice (as of R 2.2). |
varwidth |
vary box thickness according to number of data values,
as in |
whiskerpos |
With large values in the range 1..Inf, |
logbase |
An argument |
type |
Declares which boxplot elements to include in the plot. Is either a
comma-separated string of element names (as shown in the default) or a
vector of such names.
The elements have the following meaning:
|
densityplot |
Relevant if |
strip.limit |
If |
seplines |
A vector of vertical positions where horizontal lines will be drawn to separate the boxplots into groups. Position 1.5, 2.5 etc. is above the lowest, second-lowest boxplot etc. |
N.label |
A string such as "
number of values underlying the boxplot and the resulting string is
printed at the right of the plot iff |
extend |
If TRUE, will print to console some statistics for each sample:
the quantiles (0, 0.25, 0.5, 0.75,, 1), mean, quartile ratio (or at least
interquartile range) and the number of data points.
If |
levels.fos |
weird stuff, but means the same as in |
... |
all other arguments will be ignored. |
A lattice panel function to be used with bwplot.
Can draw a boxplot plus stripplot plus densityplot, indicate groups,
mark the mean and its stderror, report N, and more.
Graphical parameters are controlled by the trellis.par.set
parameters
box.rectangle, box.umbrella, superpose.symbol
(which is
non-standard), and reference.line
.
The horizontal=F
option available in panel.bwplot
is not
supported here.
Lutz Prechelt prechelt@inf.fu-berlin.de
a.resetplotparams
,
plotf
,
panel.xy
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # set grid.prompt(TRUE) to see each plot separately (click graphics window)
data(iris)
a.resetplotparams()
print(bwplot(Species~Sepal.Length, data=iris, panel=panel.bwstrip))
# A plot including a density plot:
print(bwplot(Species~Sepal.Length, data=iris, panel=panel.bwstrip,
type="mean,strip,density"))
# A customized plot:
print(bwplot(~Sepal.Length, data=iris, panel=panel.bwstrip,
groups=Species, pch=levels(iris$Species), strip.limit=200,
type="mean,strip,density",
densityplot=expression(density(X, cut=1))))
# A conventional-style plot:
print(bwplot(Species~Sepal.Length, data=iris, panel=panel.bwstrip,
type="mean,strip,grid", strip.limit=TRUE, whiskerpos=1.5,
densityplot=expression(density(X, cut=1))))
# A plot showing some other features:
print(bwplot(cut(Sepal.Width,4)~Sepal.Length, data=iris, panel=panel.bwstrip,
groups=Species, varwidth=TRUE, box.ratio=20,
which="strip,N", strip.limit=50, pch="1,2,3"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.