plotTree.lollipop: Plot a tree with one or more matched lollipop plots

View source: R/plotTree.lollipop.R

plotTree.lollipopR Documentation

Plot a tree with one or more matched lollipop plots

Description

Plots an upward facing phylogenetic tree with one or more matched lollipop plots. Inspired by a plotting style used by Title et al. (2024).

Usage

plotTree.lollipop(tree, x, args.plotTree=list(), args.lollipop=list(), ...)

Arguments

tree

an object of class "phylo".

x

a matrix, data frame, or vector of numeric values.

args.plotTree

list of arguments to be passed to plotTree.

args.lollipop

list of arguments for the lollipop plot(s).

...

optional arguments.

Value

Creates a plot.

Author(s)

Liam Revell liam.revell@umb.edu

References

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

Title, P. O., Singhal, S., Grundler, M. C., Costa, G. C., Pyron, R. A., Colston, T. J., Grundler, M. R., Prates, I., Stepanova, N., Jones, M. E. H., Cavalcanti, L. B. Q., Colli, G. R., Di-Poi, N., Donnellan, S. C., Moritz, C., Mesquita, D. O., Pianka, E. R., Smith, S. A., Vitt, L. J., and Rabosky, D. L. (2024) The macroevolutionary singularity of snakes. Science, 383, 918-923.

See Also

phylo.heatmap, plotTree.barplot

Examples

data(anoletree)
anole_tree<-as.phylo(anoletree)
data(anole.data)
anole_data<-cbind(phyl.resid(anole_tree,
  x=as.matrix(anole.data[,"SVL",drop=FALSE]),
  Y=as.matrix(anole.data[,c(6,4,2)]))$resid,
  exp(anole.data[,"SVL",drop=FALSE]))
plotTree.lollipop(anole_tree,anole_data,
  ylab=c("relative (TL)","relative (FLL)",
    "relative (HL)","SVL"))
par(mar=c(5.1,4.1,4.1,2.1))

phytools documentation built on June 22, 2024, 10:39 a.m.