Learn R Programming

markophylo (version 1.0.9)

plottree: 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, ...)

Value

Plotting function. See examples

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.

Author

Utkarsh J. Dang and G. Brian Golding

utkarshdang@cunet.carleton.ca

See Also

See also estimaterates.

Examples

Run this code
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)

Run the code above in your browser using DataLab