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

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/fibre.plot.R

Description

fibre.plot (fibrously) plots a phylogeny

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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
)

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

Details

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

Value

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

Note

I would be grateful if you could cite the article this code was released in when using this code. I maintain this code in the package "willeerd" on GitHub. I give an example of how to install this code from there below. Updates will be released through that, and I welcome code improvements!

Author(s)

Will Pearse

Examples

1
2
3
4
## Not run: 
fibre.plot(rlineage(0.1,0), "Yule_fibre.gif")

## End(Not run)

pez documentation built on June 17, 2021, 5:11 p.m.