3 \title{Plot Ancestral Character Values on a Tree}
5 Plot a phylogenetic tree with edge colors picked according to the
6 corresponding node ancestral character value.
9 \method{plot}{ancestral}(x, which = names(x$node.character), n.col = 10,
10 col.fun = function(n) rainbow(n, start = 0.4, end = 0),
11 plot.node.values = FALSE,
12 ask = prod(par("mfcol")) < length(which) && dev.interactive(),
16 \item{x}{An object of class 'ancestral'.}
17 \item{which}{Which characters to plot. Can be a vecotr of names, or a
19 \item{n.col}{The number of colors to use in the gradient.}
20 \item{col.fun}{the color function to use.}
21 \item{plot.node.values}{Should character values used as node labels?}
22 \item{ask}{Ask before each plot?}
23 \item{...}{Further parameters to pass to the plot.phylo function.}
26 This function produces one plot by selected ancestral character. It
27 uses the plot.phylo function with particular arguments to display edge
28 colors according to ancestral character values.
30 \author{Julien Dutheil \email{Julien.Dutheil@univ-montp2.fr}}
32 \code{\link{plot.phylo}}, \code{\link{evolve.phylo}}
37 names(x) <- c("A", "B", "C", "D")
38 anc <- evolve.phylo(bird.orders, x, 1)
39 plot(anc, edge.width = 3, plot.node.values = TRUE)
40 par(mfrow = c(2, 2), mar = c(5.5, 0, 0, 0))
41 plot(anc, edge.width = 3, type = "r")