endspace: Find Appropriate Barplot Margins

Description Usage Arguments Value Author(s) See Also Examples

View source: R/endspace.R

Description

Calculate bounds that can be used as xlim in a barplot.

Usage

1
endspace(x, space=0.2)

Arguments

x

matrix returned by barplot.

space

space at ends of barplot, as a fraction of bar width.

Value

Vector of two values.

Author(s)

Birkir Bardarson.

See Also

barplot.

hafroAssmt-package gives an overview of the package.

Examples

1
2
3
4
out <- endspace(barplot(stack.loss,plot=FALSE))

barplot(stack.loss, xaxs="i", xlim=out, ylim=c(0,45))
box()

hafroAssmt documentation built on May 2, 2019, 5:47 p.m.