plot.backbonePhylo {phytools}R Documentation

Plots backbone tree with triangles as clades

Description

Function plots a backbone tree (stored as an object of class "backbonePhylo") with triangles as subtrees.

Usage

## S3 method for class 'backbonePhylo'
plot(x, ...)

Arguments

x

an object of class "backbonePhylo".

...

optional arguments. So far includes only vscale, which is used to rescale the vertical dimension in plotting.

Value

Plots a tree.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

phylo.toBackbone

Examples

## first create our backbone tree with
## random subtree diversities
tree<-phytools:::lambdaTree(pbtree(n=10),lambda=0.5)
## for old versions of geiger, use lambdaTree
## create a translation table
## leaving a couple of single-taxon clades for fun
tip.label<-sample(tree$tip.label,8)
clade.label<-LETTERS[1:8]
N<-ceiling(runif(n=8,min=1,max=20))
## set crown node depth to 1/2 the maximum depth
depth<-sapply(tip.label,function(x,y) 
	0.5*y$edge.length[which(tree$edge[,2]==
	which(y$tip.label==x))],y=tree)
trans<-data.frame(tip.label,clade.label,N,depth)
rownames(trans)<-NULL
rm(tip.label,clade.label,N,depth)
## here's what trans looks like
trans
## convert
tt<-phylo.toBackbone(tree,trans)
## plot
plot(tt)

[Package phytools version 0.4-60 Index]