
Last chance! 50% off unlimited learning
Sale ends in
plot.phylo
in Class phylo
including neighbor-joining trees,
unrooted trees, trees with star shapes, ... etc.plotnj(unrooted.tree, X.class = NULL, type = "u", main = NULL,
show.tip.label = FALSE, show.node.label = FALSE,
edge.width = 1, edge.width.class = edge.width, ...)
Class phylo
.plot.phylo
in X.class
is set.X.class
is set.plot.phylo
.Class phylo
. type
can be "u", "p", "c", "f", "r" as in plot.phylo
.
If X.class
is set, then the tip branches will be drawn with
colors by class ids, and the colors are controlled by .color
.
The width of branches is controlled by edge.width
for all internal
branches and by edge.width.class
for tip branches.
plot.phylo
,
.Color
.set.seed(1234)
ret.ms <- ms(nsam = 24, opts = "-T -G 0.5")
tree.anc <- read.tree(text = ret.ms[3])
is.rooted(tree.anc)
tree.new <- as.star.tree(tree.anc)
X.class <- rep(1:6, each = 4)
par(mfrow = c(2, 2))
plotnj(tree.anc, X.class, type = "u", edge.width.class = 2,
main = "unrooted tree")
plotnj(tree.new, X.class, type = "u", edge.width.class = 2,
main = "star tree")
plotnj(tree.anc, X.class, type = "c", edge.width.class = 2,
main = "unrooted tree in cladogram")
plotnj(tree.new, X.class, type = "r", edge.width.class = 2,
main = "star tree in radial")
Run the code above in your browser using DataLab