Learn R Programming

lattice (version 0.10-10)

panel.barchart: Default Panel Function for barchart

Description

Default panel function for barchart.

Usage

panel.barchart(x, y, box.ratio = 1,
               horizontal = TRUE,
               origin = NULL, reference = TRUE,
               stack = FALSE,
               groups = NULL, 
               col = if (is.null(groups)) bar.fill$col else superpose.fill$col,
               border = if (is.null(groups)) bar.fill$border else superpose.fill$border,
               lty = if (is.null(groups)) bar.fill$lty else superpose.fill$lty, 
               lwd = if (is.null(groups)) bar.fill$lwd else superpose.fill$lwd,
               ...)

Arguments

x
Extent of Bars. By default, bars start at left of panel, unless origin is specified, in which case they start there
y
Horizontal location of bars, possibly factor
box.ratio
ratio of bar width to inter-bar space
horizontal
logical. If FALSE, the plot is `transposed' in the sense that the behaviours of x and y are switched. x is now the `factor'. Interpretation of other arguments change accordingly. See documentation of bwplot for a fuller expla
origin
origin of the bars. For grouped displays with stack = TRUE, this argument is ignored and the origin set to 0. Otherwise, defaults to NULL, in which case bars start at leftmost end of panel.
reference
logical, whether a reference line is to be drawn at the origin
stack
logical, relevant when groups is non-null. If FALSE (the default), bars for different values of the grouping variable are drawn side by side, otherwise they are stacked.
groups
optional grouping variable
...
extra arguments will be accepted but ignored

Details

A barchart is drawn in the panel. Note that most arguments controlling the display can be supplied to the high-level barchart call directly.

See Also

barchart