get a densiTree plot from a set of opentree_chronograms if densiTree plot function throws an error, it chooses the tree with the most tips as consensus (using get_biggest_multiphylo) we found that densiTree errors commonly from failing to do a consensus tree.

plot_densitree(trees, include = TRUE, ...)

Arguments

trees

A list of trees as multiPhylo or as a plain list object.

include

Boolean or numeric vector. Default to TRUE, keep all chronograms in trees. If FALSE, exclude chronograms with only two tips. If numeric, it is used as indices to subset trees object.

...

Arguments passed on to phangorn::densiTree

type

a character string specifying the type of phylogeny, so far "cladogram" (default) or "phylogram" are supported.

alpha

parameter for semi-transparent colors.

direction

a character string specifying the direction of the tree. Four values are possible: "rightwards" (the default), "leftwards", "upwards", and "downwards".

optim

not yet used.

scaleX

scale trees to have identical heights.

col

a scalar or vector giving the colours used to draw the edges for each plotted phylogeny. These are taken to be in the same order than input trees x. If fewer colours are given than the number of trees, then the colours are recycled.

width

edge width.

lty

line type.

cex

a numeric value giving the factor scaling of the tip labels.

font

an integer specifying the type of font for the labels: 1 (plain text), 2 (bold), 3 (italic, the default), or 4 (bold italic).

tip.color

color of the tip labels.

adj

a numeric specifying the justification of the text strings of the labels: 0 (left-justification), 0.5 (centering), or 1 (right-justification).

srt

a numeric giving how much the labels are rotated in degrees.

underscore

a logical specifying whether the underscores in tip labels should be written as spaces (the default) or left as are (if TRUE).

label.offset

a numeric giving the space between the nodes and the tips of the phylogeny and their corresponding labels.

scale.bar

a logical specifying whether add scale.bar to the plot.

jitter

allows to shift treees. a list with two arguments: the amount of jitter and random or equally spaced (see details below)