plot.ancestral {ape} | R Documentation |
Plot a phylogenetic tree with edge colors picked according to the corresponding node ancestral character value.
## 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(), ...)
x |
An object of class 'ancestral'. |
which |
Which characters to plot. Can be a vecotr of names, or a vector of indices. |
n.col |
The number of colors to use in the gradient. |
col.fun |
the color function to use. |
plot.node.values |
Should character values used as node labels? |
ask |
Ask before each plot? |
... |
Further parameters to pass to the plot.phylo function. |
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.
Julien Dutheil Julien.Dutheil@univ-montp2.fr
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")