fibre.plot
(fibrously) plots a phylogenyfibre.plot
(fibrously) plots a phylogeny
fibre.plot(
tree,
gif,
focal,
frames = 60,
colours = colorRampPalette(c("blue", "black", "red")),
f.colours = colorRampPalette(c("darkgreen", "lightgreen")),
pca = NULL,
clade.mat = NULL,
delay = 0.2,
side.tree = TRUE,
width = 600,
height = 600
)
The data that were plotted last, the PCA and clade.matrix to speed later plots, and the colours used.
a phylogeny (of class phylo) you wish to plot
name of GIF you would like to create. This should *not*
including a folder name (this is due to the use of
saveGIF
); "plot.gif" would be fine,
but "work/plot.gif" would not
species numbers or clade numbers to plot differently (see examples). Note that specifying a clade will highlight the clade *before* it arises; this is by design. If not specified (the default) there will be no focal species; this is fine.
number of frames for animation; this will also determine the time internals for the plot
a function that will return a colour ramp for use in
plotting of species on the fiber plot itself as well as the
standard phylogeny to the right (e.g., rainbow
)
as colours
but for the focal
species
PCA (of class prcomp
) of
phylogenetic dissimilarity matrix; NULL calculates one, I
recommend you use the output from a previous run to speed
things up
clade matrix (from
clade.matrix
$clade.matrix) of phylogeny; NULL
calculates one, I recommend you use the output from a previous
run to speed things up
the delay between each slice's frame in the output GIF; default 0.2 seconds
whether to plot a standard phylogeny to the right of the plot to aid with interpretation (default: TRUE). You almost certainly want this option
width of animation
height of animation
Will Pearse
Probably best to just plot it out and see what happens, to be honest.
if (FALSE) {
fibre.plot(rlineage(0.1,0), "Yule_fibre.gif")
}
Run the code above in your browser using DataLab