A modded version of BAMMtools::plot.bammdata

bammplot_k(
  x,
  tau = 0.01,
  method = "phylogram",
  xlim = NULL,
  ylim = NULL,
  vtheta = 5,
  rbf = 0.001,
  show = TRUE,
  labels = FALSE,
  legend = FALSE,
  spex = "s",
  lwd = 1,
  cex = 1,
  pal = "RdYlBu",
  mask = integer(0),
  mask.color = gray(0.5),
  colorbreaks = NULL,
  logcolor = FALSE,
  breaksmethod = "linear",
  color.interval = NULL,
  JenksSubset = 20000,
  par.reset = FALSE,
  direction = "rightwards",
  labelcolor = "black",
  ...
)

Arguments

x

An object of class bammdata.

tau

A numeric indicating the grain size for the calculations. See documentation for dtRates.

method

A character string indicating the method for plotting the phylogenetic tree. method = "phylogram" (default) plots the phylogenetic tree using rectangular coordinates. method = "polar" plots the phylogenetic tree using polar coordinates.

xlim

A numeric vector of coordinates for the x-axis endpoints. Defaults to NULL, in which case they are calculated automatically. The x-axis corresponds to time when the phylogeny is plotted facing to the left or to the right. The time at the root equals zero.

ylim

A numeric vector of coordinates for the y-axis endpoints. Defaults to NULL, in which case they are calculated automatically. Tips are plotted at integer values beginning from zero and stepping by one when the phylogeny is plotted facing to the left or to the right.

vtheta

A numeric indicating the angular separation (in degrees) of the first and last terminal nodes. Ignored if method = "phylogram".

rbf

A numeric indicating the length of the root branch as a fraction of total tree height. Ignored if method = "phylogram".

show

A logical indicating whether or not to plot the tree. Defaults to TRUE.

labels

A logical indicating whether or not to plot the tip labels. Defaults to FALSE.

legend

A logical indicating whether or not to plot a legend for interpreting the mapping of evolutionary rates to colors. Defaults to FALSE.

spex

A character string indicating what type of macroevolutionary rates should be plotted. "s" (default) indicates speciation rates, "e" indicates extinction rates, and "netdiv" indicates net diversification rates. Ignored if ephy$type = "trait".

lwd

A numeric specifying the line width for branches.

cex

A numeric specifying the size of tip labels.

pal

A character string or vector of mode character that describes the color palette. See Details for explanation of options.

mask

An optional integer vector of node numbers specifying branches that will be masked with mask.color when plotted.

mask.color

The color for the mask.

colorbreaks

A numeric vector of percentiles delimiting the bins for mapping rates to colors. If NULL (default) bins are calculated from the rates that are passed with the bammdata object.

logcolor

Logical. Should colors be plotted on a log scale.

breaksmethod

Method used for determining color breaks. See help file for assignColorBreaks.

color.interval

Min and max value for the mapping of rates. If NULL, then min and max are inferred from the data. NA can also be supplied for one of the two values. See details.

JenksSubset

If breaksmethod = "jenks", the number of regularly spaced samples to subset from the full rates vector. Only relevant for large datasets. See help file for assignColorBreaks.

par.reset

A logical indicating whether or not to reset the graphical parameters when the function exits. Defaults to FALSE.

direction

A character string. Options are "rightwards", "leftwards", "upwards", and "downwards", which determine the orientation of the tips when the phylogeny plotted.

labelcolor

string, color code, a vector of colors specifying the label colors

...

Further arguments passed to par.