Learn R Programming

phytools (version 0.1-9)

plotSimmap: Plot stochastic character mapped tree

Description

Function plots one or multiple stochastic character mapped trees.

Usage

plotSimmap(tree,colors=NULL,fsize=1.0,ftype="reg",lwd=2,pts=TRUE,node.numbers=FALSE)

Arguments

tree
a modified object of class "phylo" or "multiPhylo" containing a stochastic mapping or set of mappings (e.g., see read.simmap & make.simmap).
colors
a vector with names translating the mapped states to colors - see Examples.
fsize
relative font size for tip labels.
ftype
font type - options are "reg", "i" (italics), "b" (bold), or "bi" (bold-italics).
lwd
line width for plotting.
pts
logical value indicating whether or not to plot filled circles at each vertex of the tree, as well as at transition points between mapped states. Default is TRUE.
node.numbers
a logical value indicating whether or not node numbers should be plotted.

Value

  • plots a tree.

Details

The underscore character "_" is automatically swapped for a space in tip labels, as in plot.phylo.

References

Huelsenbeck, J. P., R. Neilsen, and J. P. Bollback. 2003. Stochastic mapping of morphological characters. Systematic Biology, 52, 131-138. Bollback, J. P. 2006. Stochastic character mapping of discrete traits on phylogenies. BMC Bioinformatics, 7, 88.

See Also

read.simmap, make.simmap

Examples

Run this code
X<-"((A:{aqua,0.3:terr,0.4:aqua,0.3},B:{aqua,1.0}):{aqua,1.0},(C:{aqua,0.25:terr,0.75},D:{aqua,1.0}):{aqua,1.0});"
phy<-read.simmap(text=X)
leg<-c("blue","red"); names(leg)<-c("aqua","terr")
plotSimmap(phy,leg,ftype="i")

Run the code above in your browser using DataLab