plottree: Plot the tree used with different hypothesized branch...

View source: R/custom-general14.R

plottreeR Documentation

Plot the tree used with different hypothesized branch groupings (or clades) following unique rates coloured differently.

Description

Plotting command for use on an object of class "markophylo".

Usage

plottree(x, colors = NULL, ...)

Arguments

x

An object of class "markophylo".

colors

Default works well. However, a custom vector of colours can be specified here—should be the same length as length(x$bg). Note that these colours are used to colour the different branch groupings following their own rates.

...

Any further commands to ape::plot.phylo.

Value

Plotting function. See examples

Author(s)

Utkarsh J. Dang and G. Brian Golding

utkarshdang@cunet.carleton.ca

See Also

See also estimaterates.

Examples

data(simdata2)
model2 <- estimaterates(usertree = simdata2$tree, userphyl = simdata2$data, 
                        alphabet = c(1, 2), bgtype = "ancestornodes", bg = c(7),
                        rootprob = "equal", modelmat = matrix(c(NA, 1, 2, NA), 2, 2))
plottree(model2, colors=c("blue", "darkgreen"), edge.width = 2, show.tip.label = FALSE, 
         no.margin = TRUE)
ape::nodelabels(frame = "circle", cex = 0.7)
ape::tiplabels(frame = "circle", cex = 0.7)

markophylo documentation built on Sept. 19, 2023, 5:06 p.m.