This function takes an object of class PhyloEM
, result of function
PhyloEM
, and plots the result of the inference.
# S3 method for PhyloEM
plot(
x,
traits = 1:(x$p),
params = NULL,
method.selection = NULL,
automatic_colors = TRUE,
color_characters = "black",
color_edges = "black",
plot_ancestral_states = FALSE,
name_trait = "Trait Value",
imposed_scale,
ancestral_cex = 2,
ancestral_pch = 19,
value_in_box = FALSE,
ancestral_as_shift = FALSE,
shifts_cex = 0.6,
shifts_bg = "chocolate4",
root_bg = "chocolate4",
shifts_adj = 0,
root_adj = 1,
color_shifts_regimes = FALSE,
regime_boxes = FALSE,
alpha_border = 70,
show.tip.label = FALSE,
label_cex = 0.5,
label_font = 1,
label_offset = 0,
axis_cex = 0.7,
axis_las = 0,
show_axis_traits = TRUE,
edge.width = 1,
margin_plot = NULL,
gray_scale = FALSE,
root.edge = TRUE,
...
)
an object of class PhyloEM
, result of function
PhyloEM
.
a vector of integers giving the numbers of the trait to be plotted. Default to 1:p (all the traits).
(optional) some user-specified parameters.
Must be of class params_process
. If left blank, they are extracted
using the method.selection
argument (see below).
select the parameters to plot. One of "LINselect", "DDSE",
"Djump". Default to "LINselect". See
params_process.PhyloEM
.
whether to color the edges automatically according to
their regimes. Default to TRUE. If FALSE, colors can be manually specified through
arguments color_characters
and colro_edges
(see below).
if automatic_colors=FALSE
, a vector of colors for
the tips of the tree.
if automatic_colors=FALSE
, a vector of colors for the
edges of the tree.
whether to plot the ancestral traits inferred at the internal nodes of the tree. Only available if only one trait is plotted. Default to FALSE.
name of the trait scale bar for the ancestral states plotting. Default to "Trait Value".
if plot_ancestral_states=TRUE
, a vector specifying the
imposed scale for the ancestral states plotting. Useful to make comparisons.
Default to the plotted trait.
if plot_ancestral_states=TRUE
, the size of the
ancestral states on the tree. Default to 2.
if plot_ancestral_states=TRUE
, the symbol used of the
ancestral states. Default to circles (pch=19
).
whether to plot the value of the shift in a box on the edges. Only available when only one trait is plotted. Can be difficult to read on big trees. The size of the text in the boxes is controlled by parameter. Default to FALSE.
whether to represent the ancestral value at the root
as an ancestral shift on the root edge. Default to FALSE.
shifts_cex
(see below).
if value_in_box=TRUE
, the size of the text in the boxes.
Default to 0.8.
if value_in_box=TRUE
, the background color of the boxes.
if value_in_box=TRUE
and ancestral_as_shift=TRUE
,
the background color of the ancestral box.
the adj parameter for the shifts position on the edges. Default to 0 (beginning of the edge).
if ancestral_as_shift=TRUE
, the adj parameter for the
ancestral value position on the root edge. Default to 1.
whether to color each shift according to its regime (default to the same color of the edge it's on). Default to FALSE.
whether to draw a box showing all the tips below a given.
The transparency of the border of the box is controlled by parameter
alpha_border
(see below).
if regime_boxes=TRUE
, the alpha parameter of
the border of the box. Default to 70.
whether to show the tip labels. Default to FALSE.
if show.tip.label=TRUE
, the size of the labels. Default
to 0.5.
if show.tip.label=TRUE
, the font of the labels (see par).
if show.tip.label=TRUE
, the size of the offset between
the tree and the labels. Default to 0.
cex for the label values of the plot. Default to 0.7.
las for the label values of the plot. Default to 0 (see par).
control whether the trait values axis is plotted (default to TRUE).
width of the edge. Default to 1.
vector giving the margin to around the plot.
Default to c(0, 0, 0, 0)
.
if TRUE, the colors are replaced by a gray scale. Default to FALSE.
a logical indicating whether to draw the root edge (defaults to TRUE)
further arguments to be passed to plot.phylo
.