plot.nex: plot data matrix and phylogeny

Description Usage Arguments References Examples

View source: R/plot.nex.R

Description

Plots a nexus dataset and optionally a tree

Usage

1
2
3
4
5
## S3 method for class 'nex'
plot(x, phy = NULL, legend.pos = c("none", "left",
  "right", "bottom", "top"), bw = FALSE, na.value = "lightgray",
  fsize = 8, fill = c("statelabels", "charpartition", "charset",
  "file"))

Arguments

x

a 'nex' object for plotting

phy

a phylogeny in 'phylo' format

legend.pos

position of legend

bw

whether to plot in black (scoring present) and white (no scoring)

na.value

color for NA values in matrix

fsize

font size

fill

how to color cells in matrix

References

Brusatte, S. L., G. T. Lloyd, S. C. Wang, and M. A. Norell. 2014. Gradual Assembly of Avian Body Plan Culminated in Rapid Rates of Evolution across the Dinosaur-Bird Transition. Curr Biol 24:2386–2392. (PubMed)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# load theropod dataset:
data(twig)
# plot data matrix
plot(twig[,1:10], fill="statelabels", legend.pos="top", na.value="black")
# plot matrix alongside phylogeny
library(ape)
s <- "(Tyrannosaurus_rex,(Archaeopteryx_lithographi,Anas_platyrhynchus));"
phy <- compute.brlen(read.tree(text=s))
plot(phy)
plot(x=twig[,1:20], phy=phy, fill="statelabels", legend.pos="top", na.value="white")

## End(Not run)

celiason/phenotools documentation built on Sept. 12, 2019, 6:49 p.m.