Learn R Programming

phytools (version 2.1-1)

linklabels: Function to add tip labels to a plotted tree with linking lines

Description

Adds tip labels to a plotted tree by drawing curved, bent, or straight linking lines.

Usage

linklabels(text,tips,link.type=c("bent","curved","straight"),
   ...)

Value

This function annotates a plot.

Arguments

text

text string or vector to be used as labels.

tips

node numbers (indices) for the tips to be labeled.

link.type

manner in which to draw the linking lines.

...

optional arguments, including cex, lty, lwd, and col.

Author

Liam Revell liam.revell@umb.edu

Details

The idea underlying this function is that the user should first plot the tree without tip labels, but set the area of the plotting device to be sufficient to accommodate the tip labels once they have been added. The function then can be called to add tip labels connected by linking lines to the tips of the plotted tree.

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

See Also

cladelabels, nodelabels, tiplabels