plot.ancestral

0th

Percentile

Plot Ancestral Character Values on a Tree

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

Keywords
hplot
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
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.
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

Aliases
  • plot.ancestral
Examples
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")
Documentation reproduced from package ape, version 2.1-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.