View source: R/plot.phyloExtra.R
plotTreeTime | R Documentation |
This function plots a non-ultrametric tree where the tips are not contemporary together with their dates on the x-axis.
plotTreeTime(phy, tip.dates, show.tip.label = FALSE, y.lim = NULL,
color = TRUE, ...)
phy |
an object of class |
tip.dates |
a vector of the same length than the number of tips
in |
show.tip.label |
a logical value; see |
y.lim |
by default, one fifth of the plot is left below the tree; use this option to change this behaviour. |
color |
a logical value specifying whether to use colors for the
lines linking the tips to the time axis. If |
... |
other arguments to be passed to |
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.
NULL
Emmanuel Paradis
plot.phylo
, estimate.dates
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.