plot.l1ou: Visualizes a shift configuration: tree and trait(s)

Description Usage Arguments Value Examples

View source: R/tools.R

Description

plots the tree annotated to show the edges with a shift, and the associated trait data side by side.

Usage

1
2
3
4
5
## 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, ...)

Arguments

model

object of class l1ou returned by estimate_shift_configuration.

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.

Value

none.

Examples

1
2
3
4
5
6
7
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)

khabbazian/l1ou documentation built on July 30, 2018, 12:05 p.m.