plot.l1ou | R Documentation |
Plots the tree annotated to show the edges with a shift, and the associated trait data side by side. Each trait is shown standardized, to visually highlight the species with low, average or high values. In other words, the axis scale shows the values of (trait - m)/sd where m is the observed trait mean and sd is the observed trait standard deviation. The values on the left and right side of the axis are the mininum and maximum of the standardized trait: (min-m)/sd and (max-m)/sd. The place where the bars start corresponds to the mean of the original trait values.
## S3 method for class 'l1ou' plot(model, palette = NA, edge.shift.ann = TRUE, edge.shift.adj = c(0.5, -0.025), edge.label = c(), asterisk = TRUE, edge.label.ann = FALSE, edge.label.adj = c(0.5, 1), edge.label.pos = NA, edge.ann.cex = 1, plot.bar = TRUE, bar.axis = TRUE, ...)
model |
object of class l1ou returned by |
palette |
vector of colors, of size the number of shifts plus one. The last element is the color for the background regime (regime at the root). |
edge.shift.ann |
logical. If TRUE, annotates edges by shift values. |
edge.shift.adj |
adjustment argument to give to edgelabel() for labeling edges by shift values. |
edge.label |
vector of size number of edges. |
asterisk |
logical. If TRUE, the shift positions will be annotated by "*". It is useful for gray scale plots. |
edge.label.ann |
logical. If TRUE, annotates edges by labels in tree$edge.label, if non-empty, or edge.label. |
edge.label.adj |
adjustment argument to give to edgelabel() for labeling edges. |
edge.label.pos |
relative position of the edge.label on the edge. 0 for the beginning of the edge and 1 for the end of the edge. |
edge.ann.cex |
amount by which the annotation text should be magnified relative to the default. |
plot.bar |
logical. If TRUE, the bars corresponding to the trait values will be plotted. |
bar.axis |
logical. If TRUE, the axis of of trait(s) range will be plotted. |
... |
further arguments to be passed on to plot.phylo. |
none.
data(lizard.traits, lizard.tree) Y <- lizard.traits[,1] eModel <- estimate_shift_configuration(lizard.tree, Y) nEdges <- Nedge(lizard.tree) ew <- rep(1,nEdges) ew[eModel$shift.configuration] <- 3 plot(eModel, cex=0.5, label.offset=0.02, edge.width=ew)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.