plot.nex | R Documentation |
Plots a nexus dataset and optionally a tree
## S3 method for class 'nex'
plot(
x,
y = NULL,
phy = NULL,
legend.pos = c("none", "left", "right", "bottom", "top"),
bw = FALSE,
na.value = "lightgray",
fsize = 8,
fill = c("statelabels", "charpartition", "charset", "file"),
...
)
x |
a 'nex' object for plotting |
y |
unused |
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 |
... |
additional arguments (unused) |
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)
## 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));"
s <- "(trex,(al,ap));"
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.