Learn R Programming

ape (version 5.6-2)

plot.phylo.extra: Extra Fuctions to Plot and Annotate Phylogenies

Description

These are extra functions to plot and annotate phylogenies, mostly calling basic graphical functions in ape.

Usage

plotBreakLongEdges(phy, n = 1, ...)
drawSupportOnEdges(value, ...)

Value

NULL

Arguments

phy

an object of class "phylo".

n

the numner of long branches to be broken.

value

the values to be printed on the internal branches of the tree.

...

further arguments to be passed to plot.phylo or to edgelabels.

Author

Emmanuel Paradis

Details

drawSupportOnEdges assumes the tree is unrooted, so the vector value should have as many values than the number of internal branches (= number of nodes - 1). If there is one additional value, it is assumed that it relates to the root node and is dropped (see examples).

See Also

plot.phylo, edgelabels, boot.phylo, plotTreeTime

Examples

Run this code
tr <- rtree(10)
tr$edge.length[c(1, 18)] <- 100
op <- par(mfcol = 1:2)
plot(tr); axisPhylo()
plotBreakLongEdges(tr, 2); axisPhylo()

## from ?boot.phylo:
f <- function(x) nj(dist.dna(x))
data(woodmouse)
tw <- f(woodmouse) # NJ tree with K80 distance
set.seed(1)
## bootstrap with 100 replications:
(bp <- boot.phylo(tw, woodmouse, f, quiet = TRUE))
## the first value relates to the root node and is always 100
## it is ignored below:
plot(tw, "u")
drawSupportOnEdges(bp)
## more readable but the tree is really unrooted:
plot(tw)
drawSupportOnEdges(bp)
par(op)

Run the code above in your browser using DataLab