ape (version 1.8-4)

plot.ancestral: Plot Ancestral Character Values on a Tree

Description

Plot a phylogenetic tree with edge colors picked according to the corresponding node ancestral character value.

Usage

## S3 method for class 'ancestral':
plot(x, which = names(x$node.character), n.col = 10,
col.fun = function(n) rainbow(n, start = 0.4, end = 0),
plot.node.values = FALSE,
ask = prod(par("mfcol")) < length(which) && dev.interactive(),
...)

Arguments

Details

This function produces one plot by selected ancestral character. It uses the plot.phylo function with particular arguments to display edge colors according to ancestral character values.

See Also

plot.phylo, evolve.phylo

Examples

Run this code
data(bird.orders)
x <- rep(0, 4)
names(x) <- c("A", "B", "C", "D")
anc <- evolve.phylo(bird.orders, x, 1)
plot(anc, edge.width = 3, plot.node.values = TRUE)
par(mfrow = c(2, 2), mar = c(5.5, 0, 0, 0))
plot(anc, edge.width = 3, type = "r")

Run the code above in your browser using DataCamp Workspace