Learn R Programming

BAMMtools (version 2.1.12)

plot.credibleshiftset: Plot credible set of rate shift configurations from BAMM analysis

Description

Plots the credible set of rate shift configurations from a BAMM analysis on a phylogeny.

Usage

# S3 method for credibleshiftset
plot(
  x,
  plotmax = 9,
  method = "phylogram",
  pal = "RdYlBu",
  shiftColor = "black",
  spex = "s",
  add.freq.text = TRUE,
  use.plot.bammdata = TRUE,
  border = TRUE,
  legend = FALSE,
  send2pdf = FALSE,
  logcolor = FALSE,
  breaksmethod = "linear",
  color.interval = NULL,
  JenksSubset = 20000,
  ...
)

Arguments

x

An object of class credibleshiftset.

plotmax

An integer number of plots to display.

method

A coordinate method to use for plotting. Options are "phylogram" or "polar".

pal

A color palette to use with plot.bammdata.

shiftColor

Color to use for shift points.

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

add.freq.text

A logical indicating whether to add the posterior frequency of each shift configuration to the plotting region.

use.plot.bammdata

A logical indicating whether to use plot.bammdata (TRUE) or plot.phylo (FALSE).

border

A logical indicating whether to frame the plotting region.

legend

A logical indicating whether to plot a legend.

send2pdf

A logical indicating whether to print the figure to a PDF file.

logcolor

A logical indicating whether the rates should be log-transformed.

breaksmethod

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

color.interval

Min and max value for the mapping of rates. One of the two values can be NA. See details in plot.bammdata for further 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.

...

Further arguments to pass to plot.bammdata.

Author

Mike Grundler

Details

This produces phylorate plots for the plotmax most-probable shift configurations sampled with BAMM. Shift configurations are plotted in a single graphics window. The posterior probability (frequency) of each rate shift configuration in the posterior is shown (omitted with argument add.freq.text = FALSE).

Points are added to the branches subtending the nodes of each rate configuration. The size of the point is proportional to the marginal probability that a shift occurs on a specific branch.

References

http://bamm-project.org/

See Also

credibleShiftSet, distinctShiftConfigurations, plot.bammdata, plot.bammshifts

Examples

Run this code
data(events.whales)
data(whales)
ed <- getEventData(whales, events.whales, nsamples=500)
cset <- credibleShiftSet(ed, expectedNumberOfShifts = 1, threshold = 5)
plot(cset)

Run the code above in your browser using DataLab