Description Usage Arguments Details See Also Examples
Add text or symbols to the tip labels of a phylogenetic tree.
1 2 3 |
phy |
An object of class |
tips |
A vector of mode |
offset |
Used to control the distance of text or symbols from
the tips of the phylogenetic tree. Can either be of mode
|
align |
Logical, if |
grid |
Logial, if |
col |
A character string, giving the color for text or symbols. |
text |
A character string, providing text to be appended to the tip labels. |
pch |
An integer, specifying the symbol used (see |
cex |
A real number, giving the character expension
(see |
legend |
A character string to be used as a column legend. |
legend.srt |
A vector of mode |
legend.cex |
A real number, giving the character expension for the legend. |
... |
Further graphical parameters (from par), such as srt, family and xpd. |
Currently, append2tips
is will work only for
plot.phylo
using types "phylogram"
or
"cladogram"
and directions "rightwards"
or
"leftwards"
.
plot.phylo
, tiplabels
,
mixedFontBinom
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # phylogeny of true vipers
# ------------------------
#data(viperidae)
#plot.phylo(viperidae, cex = 0.9, label.offset = 0.01)
# append geographical origin of accessions:
# -----------------------------------------
#txt <- origin[, 2]
#append2tips(viperidae, text = txt)
# If the appended labels - like in the example above -
# exceed the plotting region, a warning is issued and it
# is suggested a new value for x.lim:
# -----------------------------------
#plot.phylo(viperidae, cex = 0.9, label.offset = 0.01, x.lim = 1.1)
#append2tips(viperidae, text = txt)
# a lot of combinations are possible:
# -----------------------------------
#plot.phylo(viperidae, cex = 0.8, label.offset = 0.02, x.lim = 1.5)
#NTips <- length(viperidae$tip.label)
#append2tips(viperidae, text =
# paste("A", 1:NTips, sep = "-"), col = "orange")
#append2tips(viperidae, tips <- c(5, 7:9, 14),
# text = rep("xxx", 5), col = "slateblue")
#append2tips(viperidae, pch = 23, col = rainbow(NTips))
#append2tips(viperidae, pch = 21, col = "grey50",
# align = TRUE, grid = TRUE)
# ... it also works when actual tip labels are omitted:
# -----------------------------------------------------
#plot.phylo(viperidae, show.tip.label = FALSE, x.lim = 40,
# cex = 0.8, type = "clado", use.edge.length = FALSE)
#txt <- origin[, 2]
#append2tips(viperidae, text = txt)
# ... it can be combined with taxo.fonts:
# -----------------------------------------------------
#plot.phylo(viperidae, show.tip.label = FALSE, x.lim = 1.5)
#taxo.fonts(viperidae)
#txt <- origin[, 2]
#append2tips(viperidae, text = txt, offset = 0.1, grid = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.