addlabels.barplot: add labels to a barplot

View source: R/mixstock.R

addlabels.barplotR Documentation

add labels to a barplot

Description

Adds labels (at specified heights) to an existing barplot

Usage

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

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

bbolker/mixstock documentation built on July 23, 2024, 12:18 p.m.