lattice (version 0.3-1)

barchart: Bar Graphs

Description

Draw Bar plots

Usage

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
...
other arguments

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.

See Also

trellis.args, panel.barchart,Lattice

Examples

Run this code
data(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