plotSimmap | R Documentation |
Plots one or multiple stochastic character mapped trees.
plotSimmap(tree, colors=NULL, fsize=1.0, ftype="reg", lwd=2, pts=FALSE,
node.numbers=FALSE, mar=NULL, add=FALSE, offset=NULL,
direction="rightwards", type="phylogram", setEnv=TRUE,
part=if(type=="arc") 0.5 else 1.0, xlim=NULL, ylim=NULL,
nodes="intermediate", tips=NULL, maxY=NULL, hold=TRUE,
split.vertical=FALSE, lend=2, asp=NA, outline=FALSE,
plot=TRUE, underscore=FALSE, arc_height=2)
## S3 method for class 'simmap'
plot(x, ...)
## S3 method for class 'multiSimmap'
plot(x, ...)
tree |
an object of class |
colors |
a vector with names translating the mapped states to colors - see |
fsize |
relative font size for tip labels. |
ftype |
font type - options are |
lwd |
line width for plotting. |
pts |
logical value indicating whether or not to plot filled circles at each vertex of the tree, as well as at transition points between mapped states. Default is |
node.numbers |
a logical value indicating whether or not node numbers should be plotted. |
mar |
vector containing the margins for the plot to be passed to |
add |
a logical value indicating whether or not to add the plotted tree to the current plot ( |
offset |
offset for the tip labels in character widths. |
direction |
plotting direction. Options are |
type |
plot type. Can be |
setEnv |
logical value indicating whether or not to set the environment |
part |
value between 0 and 1 for |
xlim |
x-limits for the plot. |
ylim |
y-limits for the plot. |
nodes |
node placement following Felsenstein (2004; pp. 574-576). Can be |
tips |
labeled vector containing the vertical position of tips. Normally this will be |
maxY |
maximum value of y to use before rotating a tree into fan configuration. This will only make a difference if different from |
hold |
logical argument indicating whether or not to hold the output to the graphical device before plotting. Defaults to |
split.vertical |
split the color of the vertically plotted edges by the state of the daughter edges. Only applies if the edge state changes exactly at a node. |
lend |
line end style. See |
asp |
aspect ratio. See |
outline |
logical value indicating whether or not to draw a black outline around the plotted edges of the tree. |
plot |
logical value indicating whether or not to actually plot the tree. (See equivalent argument in |
underscore |
logical value indicating whether to plot the underscore character, |
arc_height |
for |
x |
for S3 plotting method, object of class |
... |
for S3 plotting method, other arguments to be passed to |
Plots a tree.
Liam Revell liam.revell@umb.edu
Bollback, J. P. (2006) Stochastic character mapping of discrete traits on phylogenies. BMC Bioinformatics, 7, 88.
Felsenstein, J. (2004) Inferring Phylogenies. Sinauer.
Huelsenbeck, J. P., R. Neilsen, and J. P. Bollback (2003) Stochastic mapping of morphological characters. Systematic Biology, 52, 131-138.
Revell, L. J. (2014) Graphical methods for visualizing comparative data on phylogenies. Chapter 4 in Modern phylogenetic comparative methods and their application in evolutionary biology: Concepts and practice (L. Z. Garamszegi ed.), pp. 77-103.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
densityMap
, make.simmap
, read.simmap
data(anoletree)
cols<-setNames(c("green","#E4D96F","darkgreen",
"brown","black","darkgrey"),
c("CG","GB","TC","TG","Tr","Tw"))
plot(anoletree,cols,fsize=0.5,ftype="i",outline=TRUE,
lwd=3,ylim=c(0,Ntip(anoletree)),
mar=c(0.1,0.1,1.1,0.1))
add.simmap.legend(colors=cols,prompt=FALSE,x=0,y=-0.5,
vertical=FALSE)
title(main="Caribbean ecomorphs of anoles",font.main=3,
line=0)
par(mar=c(5.1,4.1,4.1,2.1)) ## reset margins to default
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.