data(bird.families)
data(bird.orders)
opar <- par(mfrow = c(2, 1))
ltt.plot(bird.families)
title("Lineages Through Time Plot of the Bird Families")
ltt.plot(bird.families, log = "y")
title(main = "Lineages Through Time Plot of the Bird Families",
sub = "(with logarithmic transformation of the y-axis)")
par(opar)
### to plot the tree and the LTT plot together
tmp <- bird.families
tmp$tip.label <- rep("", length(bird.families$tip.label))
tmp2 <- bird.orders
tmp2$tip.label <- rep("", length(bird.orders$tip.label))
layout(matrix(1:4, 2, 2))
plot(tmp)
ltt.plot(bird.families, main = "Bird families")
plot(tmp2)
ltt.plot(bird.orders, main = "Bird orders")
layout(matrix(1))
mltt.plot(bird.families, bird.orders)
### Generates 10 random trees with 23 tips:
TR <- list()
for (i in 1:10) TR <- c(TR, list(rtree(23)))
### Give names to each tree:
names(TR) <- paste("random tree", 1:10)
### And specify the class of the list so that mltt.plot()
### does not trash it!
class(TR) <- c("phylo", "multi.tree")
### (This is non-sense: the trees are not ultrametric!)
mltt.plot(TR)
### Now rescale the branche lengths to have roughly the
### same scale than for the avian orders
for (i in 1:10) TR[[i]]$edge.length <- 7 * TR[[i]]$edge.length
### And now for something (not so) completely different...
### ... but still non-nense!
ltt.plot(bird.orders, lwd = 2)
for (i in 1:10) ltt.lines(TR[[i]], lty = 2)
legend(-10, 5, lwd = c(2, 1), lty = c(1, 2), bty = "n",
legend = c("Bird orders", "Random trees"))
Run the code above in your browser using DataLab