TITLE(barplot @@ Barplots)
USAGE(
barplot(height, width = 1, space, names.arg, legend.text,
        beside = FALSE, horiz = FALSE, col = NULL,
        border = par("fg"), main = NULL, xlab = NULL,
        ylab = NULL, xlim, ylim, axes = TRUE, ...)
)
ALIAS(barplot)
ARGUMENTS(
ARG(height @@ either a vector or matrix of values describing the bars
which make up the plot.  If LANG(height) is a vector, the plot consists
of a sequence of rectangular bars with heights given by the values in
the vector.  If LANG(height) is a matrix and LANG(beside) is LANG(FALSE)
then each bar of the plot corresponds to a column of LANG(height), with
the values in the column giving the heights of stacked ``sub-bars''
making up the bar. If LANG(height) is a matrix and LANG(beside) is
LANG(TRUE), then the values in each column are juxtaposed rather than
stacked.)
ARG(width @@ optional vector of bar widths.)
ARG(space @@ the amount of space (as a fraction of the average bar
width) left before each bar.  May be given as a single number or one
number per bar.  If LANG(height) is a matrix and LANG(beside) is
LANG(TRUE), LANG(space) may be specified by two numbers, where the first
is the space between bars in the same group, and the second the space
between the groups.  If not given explicitly, it defaults to LANG(c(0,1))
if LANG(height) is a matrix and LANG(beside) is LANG(TRUE), and to
0.2 otherwise.)
ARG(names.arg @@ a vector of names to be plotted below each bar or group
of bars.  If this argument is omitted, then the names are taken from the
LANG(names) attribute of LANG(height) if this is a vector, or the column
names of LANG(height) if this is a matrix.)
ARG(legend.text @@ a vector of text used to construct a legend for the
plot.  This is only useful when LANG(height) is a matrix.  In that case
the legend labels should correspond to the rows of LANG(height).)
ARG(beside @@ a logical value.  If LANG(FALSE), the columns of
LANG(height) are portrayed as stacked bars, and if LANG(TRUE) the
columns are portrayed as juxtaposed bars.)
ARG(horiz @@ a logical value.  If LANG(FALSE), the bars are drawn
vertically with the first bar to the left.  If LANG(TRUE), the bars are
drwan horizontally with the first at the bottom.)
ARG(col @@ a vector of colors for the bars or bar components.)
ARG(border @@ the color to be used for the border of the bars.)
ARG(main @@ an overall title for the plot.)
ARG(xlab @@ a label for the x axis.)
ARG(ylab @@ a label for the y axis.)
ARG(xlim @@ limits for the x axis.)
ARG(ylim @@ limits for the y axis.)
ARG(axes @@ logical.  If LANG(TRUE), a vertical axis is drawn.)
ARG(DOTS @@ further arguments are passed to LANG(title(.)).)
)
VALUE(
This function is invoked for its side effect of producing a barplot in
the graphics window.  It returns no useful value.
)
SEEALSO(
LANG(LINK(dotplot)),
LANG(LINK(hist)).
)
EXAMPLES(
data(deaths)
barplot(deaths, beside=TRUE,
        col=c("lightblue", "mistyrose", "lightcyan",
              "lavender", "cornsilk"),
        legend=rownames(deaths), ylim=c(0,100))
title(main="Death Rates in Virginia", font.main=4)
BLANK
barplot(t(deaths)[,5:1], beside=TRUE,
        col=c("lightblue", "mistyrose",
              "lightcyan", "lavender"),
        legend=colnames(deaths), ylim=c(0,80),
        main="Death Rates in Virginia", font.main=4)
        # instead of title(.)
)
