Description
Draw Bar plotsUsage
barchart(formula,
data = parent.frame(),
panel = panel.barchart,
box.ratio =2,
...)
Arguments
formula
a formula describing the form of conditioning plot. A
formula of the form y ~ x | g1 * g2 * ...
indicates that plots of
y
versus x
should be produced conditional on the
variable g1,g2,...
.
panel
panel function to be used to draw panels
data
data frame for the variables in the formula etc
box.ratio
ratio of bar width to inter bar width
Value
- An object of class ``trellis'', plotted by default by
print.trellis
.
synopsis
barchart(formula, data = parent.frame(), panel = "panel.barchart",
prepanel = NULL, strip = TRUE, box.ratio = 2, groups = NULL,
..., subset = TRUE)Details
see the documentation for trellis.args
.Examples
Run this codedata(barley)
barchart(variety ~ yield | year * site, data = barley, aspect = 0.4,
xlab = "Barley Yield (bushels/acre)")
Run the code above in your browser using DataLab