addlabels.barplot: add labels to a barplot

Description Usage Arguments Value Author(s) Examples

View source: R/mixstock.R

Description

Adds labels (at specified heights) to an existing barplot

Usage

1
addlabels.barplot(x, vals, names, min = 0.1, cols = par("fg"), horiz = FALSE, ...)

Arguments

x

x positions (may be derived from a call to barplot)

vals

heights of labels

names

label text

min

minimum size for adding labels

cols

colors of label text

horiz

horizontal barplot

...

additional arguments to text()

Value

none.

Author(s)

Ben Bolker

Examples

1
2
3
4
set.seed(1001)
bvals <- matrix(runif(12),nrow=3)
b <- barplot(bvals)
addlabels.barplot(b,bvals,LETTERS[1:12])

mixstock documentation built on May 2, 2019, 6:48 p.m.