Learn R Programming

phytools (version 2.5-2)

phylomorphospace3d: Creates three-dimensional phylomorphospace plot

Description

Creates a phylomorphospace plot in three dimensions.

Usage

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

Arguments

Value

This function creates a three dimensional phylomorphospace plot. The function returns a function from spin3d (for method="dynamic"); or a series of functions from scatterplot3d (for method="static").

Details

This function creates a phylomorphospace plot for three characters using the 3D visualization package, rgl (if available) or statically, by simulating 3D on a flat graphical device.

References

Revell, L. J. (2014) Graphical methods for visualizing comparative data on phylogenies. Chapter 4 in Modern phylogenetic comparative methods and their application in evolutionary biology: Concepts and practice (L. Z. Garamszegi ed.), pp. 77-103.

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

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
## load data
data(anoletree)
data(anole.data)

## run phylogenetic PCA
anole.pca<-phyl.pca(anoletree,anole.data)

if (FALSE) {
## create dynamic plot using rgl
phylomorphospace3d(anoletree,scores(anole.pca)[,1:3],
    control=list(spin=FALSE))}

## create static plot
par(cex=0.5) ## adjust font size
phylomorphospace3d(anoletree,scores(anole.pca)[,1:3],
    method="static",angle=-30)
par(cex=1) ## reset to default

Run the code above in your browser using DataLab