Learn R Programming

pez (version 1.2-4)

fibre.plot: fibre.plot (fibrously) plots a phylogeny

Description

fibre.plot (fibrously) plots a phylogeny

Usage

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
)

Value

The data that were plotted last, the PCA and clade.matrix to speed later plots, and the colours used.

Arguments

tree

a phylogeny (of class phylo) you wish to plot

gif

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

focal

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.

frames

number of frames for animation; this will also determine the time internals for the plot

colours

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)

f.colours

as colours but for the focal species

pca

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.mat

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

delay

the delay between each slice's frame in the output GIF; default 0.2 seconds

side.tree

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

width of animation

height

height of animation

Author

Will Pearse

Details

Probably best to just plot it out and see what happens, to be honest.

Examples

Run this code
if (FALSE) {
fibre.plot(rlineage(0.1,0), "Yule_fibre.gif")
}

Run the code above in your browser using DataLab