Learn R Programming

phytools (version 0.3-72.1)

phylomorphospace3d: Creates tree-dimensional phylomorphospace plot

Description

This function creates a phylomorphospace plot for three characters using the 3D visualization package, 'rgl'.

Usage

phylomorphospace3d(tree, X, A=NULL, label=TRUE, control=list(), 
	method=c("dynamic","static"), ...)

Arguments

tree
a phylogenetic tree in "phylo" format.
X
an n x 3 matrix of tip values for two characters in n species.
A
an optional m x 3 matrix (for m nodes) of values for two taits at internal nodes in the tree - if not supplied, these values will be estimated using anc.ML.
label
logical value indicating whether to print tip labels next to terminal nodes in the plot (presently doesn't do anything, but labels can be dropped using control).
control
a list containing the following optional control parameters: spin: a logical value indicating whether to animate the plot when created; axes: a logical indicating whether to plot the axes; box: a logical value indica
method
a string either "dynamic" for a dynamic (animated) plot created using rgl; or "static" for a flat 3D plot created using scatterplot3d and base graphics. The latter has the advantage of being very easy to
...
optional arguments to be passed to scatterplot3d. Most options not available. angle is an important option that does work here.

Value

  • This function creates a three dimensional phylomorphospace plot

References

Sidlauskas, B. (2008) Continuous and arrested morphological diversification in sister clades of characiform fishes: A phylomorphospace approach. Evolution, 62, 3135--3156.

See Also

fancyTree, phenogram, phylomorphospace

Examples

Run this code
tree<-pbtree(n=25)
X<-fastBM(tree,nsim=3)
phylomorphospace3d(tree,X,control=list(spin=FALSE))
phylomorphospace3d(tree,X,method="static")

Run the code above in your browser using DataLab