Description Usage Arguments Value Author(s) See Also Examples
This functions create vectors with color names that can be used as input for the tip.color
and edge.color
arguments of plot.phylo
from the ape
package.
1 2 3 |
phy |
an object of class |
groups |
vector, matrix, or list, giving the groups, either monophyletic or not, whose edges will be colored. The elements of |
tips |
a vector or list of mode |
regex |
logical: if true, all elements of |
bgcol |
a character string, giving the default color, i.e. the color for those edges and tips not present in |
col |
a vector of mode |
what |
a character string, indicating whether the stem lineage of a clade shall be included ( |
a vector of mode character
.
Christoph Heibl
plot.phylo
for plotting of phylogenies; clade.bars
, box.clades
, and box.tips
for high-lighting clades in phylogenies; taxo.fonts
for setting nomenclaturally proper tip labels.
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 | # phylogentic relationships of bird orders:
data(bird.orders)
## 1. EXAMPLE: three monophyletic clades
## -------------------------------------
# define clades:
clades <- list(1:5, 8:12, 13:23)
# generate edge colors:
mycols <- c("orange", "purple", "blue")
ecol <- edge.color(bird.orders, clades, col = mycols)
# plot tree:
plot(bird.orders, edge.color = ecol,
no.margin = TRUE, edge.width = 2)
## 2. EXAMPLE: depict patristic distance between two tips
## ------------------------------------------------------
group <- c("Strigiformes", "Piciformes")
ecol <- edge.color(bird.orders, group, col = "red")
tcol <- tip.color(bird.orders, group, col = "red")
plot(bird.orders, edge.color = ecol, tip.color = tcol,
no.margin = TRUE, edge.width = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.