add.scalebar: add.scalebar Add a scale bar to the plot.

View source: R/tree.R

add.scalebarR Documentation

add.scalebar Add a scale bar to the plot.

Description

add.scalebar Add a scale bar to the plot.

Usage

add.scalebar(obj, len = 1, x0 = NA, y0 = NA, lwd = 2, ...)

Arguments

obj:

'phyloLayout' S3 object generated by 'tree.layout'

len:

length of scale bar to draw (defaults to 1)

x0:

(optional) override default horizontal placement of bar

y0:

(optional) override default vertical placement of bar. Note both x and y need to be specified to override the default.

...:

additional graphical parameters to pass to 'segments', such as 'cex', 'col' and 'lwd'.

Examples

require(ape)
phy <- rcoal(30)
Y <- tree.layout(phy, type='r')
plot(Y)
add.scalebar(Y, len=1)

ArtPoon/ggfree documentation built on July 11, 2024, 11:15 a.m.