plotTreeTime: Plot Tree With Time Axis

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plot.phyloExtra.R

Description

This function plots a non-ultrametric tree where the tips are not contemporary together with their dates on the x-axis.

Usage

1
plotTreeTime(phy, tip.dates, show.tip.label = FALSE, y.lim = NULL, ...)

Arguments

phy

an object of class "phylo".

tip.dates

a vector of the same length than the number of tips in phy (see details).

show.tip.label

a logical value; see plot.phylo.

y.lim

by default, one fifth of the plot is left below the tree; use this option to change this behaviour.

...

other arguments to be passed to plot.phylo.

Details

The vector tip.dates may be numeric or of class “Date”. In either case, the time axis is set accordingly. The length of this vector must be equal to the number of tips of the tree: the dates are matched to the tips numbers. Missing values are allowed.

Value

NULL

Author(s)

Emmanuel Paradis

See Also

plot.phylo, estimate.dates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dates <- as.Date(.leap.seconds)
tr <- rtree(length(dates))
plotTreeTime(tr, dates)

## handling NA's:
dates[11:26] <- NA
plotTreeTime(tr, dates)

## dates can be on an arbitrary scale, e.g., [-1, 1]:
plotTreeTime(tr, runif(Ntip(tr), -1, 1))

Example output



ape documentation built on April 5, 2018, 1:03 a.m.