Description Usage Arguments Details Note Author(s) See Also Examples
This function plots highest posterior density (HPD) intervals of node ages derived from BEAST (or other molecular dating) analyses. The default of the label
argument works with objects generated by read.beast
and read.beast.table
.
1 2 |
phy |
An object of class |
label |
A character string used to identify the columns or list elements for plotting (see details). |
tab |
A matrix, containg at least three columns. |
nodes |
A vector of mode |
col |
A character string, the color for the HPD bars |
lwd |
An integer, the thickness (line width) for the HPD bars |
broken |
Logical, if |
... |
Further graphical parameters may also be supplied as arguments. |
The label
argument identifies those two elements of a phylo
object (if tab = NULL
) or columns names of matrix (specified by the tab
argument) that give upper and lowers bounds for ranges or HPDs. The upper and the lower bound have to be characterized by the additon of _MAX
and_MIN
to the label string. Hence, in a typical BEAST analysis, you can choose between "rate_range"
, "rate_95%_HPD"
, "height_range"
, and "height_95%_HPD"
(the default) for label
.
Currently, HPDbars
works only with plot.phylo(type = "phylogram")
.
Christoph Heibl
read.beast
and read.beast.table
to read BEAST/TreeAnnotaor output; plot.phylo.upon
plots a phylogeny with 'transparent' background; node.support
can be used to show posterior probablities, rates, etc.; axisChrono
to add a time-scale.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # a BEAST analysis of wild barley
# -------------------------------
data(hordeum)
# plot tree invisibly to define the plotting region
# -------------------------------------------------
plot(hordeum, edge.color = 0, tip.color = 0)
# plot highest posterior density bars
# note the warning message!
# -------------------------
HPDbars(hordeum, col = "skyblue", lwd = 5)
# plot tree again with transparent background
# -------------------------------------------
plot.phylo.upon(hordeum)
# the same plot but with x.lim set to the values
# issued by the HPDbars warning message
# -------------------------------------
plot(hordeum, edge.color = 0, tip.color = 0,
x.lim = c(-5.24603, 23.26244))
HPDbars(hordeum, col = "skyblue", lwd = 5)
plot.phylo.upon(hordeum)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.