ngen=max(nodeHeights(tree))
. For type="threshold"
the visualization is of the threshold model (Felsenstein 2012), in which the evolving character is liability and the segments of evolution are colored by their value for the threshold trait. If type="threshold"
is used, the function requires at least one addition input: thresholds
, a vector containing the ordered thresholds between states. The user can also provide the colors for plotting in colors
. Note that one more color than threshold should be provided as one threshold implies two states; two thresholds, three states; etc. If no value for colors
is provided, the function will recycle a set of four colors up to the number of times required by thresholds
. Finally, the optional argument return.tree=TRUE
will tell the function to return a list with the tip and note states and an object of class "phylo"
with (for type="threshold"
), the state for the threshold model through time mapped on the branches of the tree in discrete time.bmPlot(tree, type="BM", anc=0, sig2=1/1000, ngen=1000, ...)
"phylo"
format.fastBM
, pbtree
, phenogram
, threshBayes
# plot BM simulation on 20 taxon tree
tree<-pbtree(n=20)
x<-bmPlot(tree)
# plot simulation of a threshold character
tree<-pbtree(n=20)
x<-bmPlot(tree,type="threshold",thresholds=c(0,1,2))
Run the code above in your browser using DataLab