plot.taxonomy {FossilSim} | R Documentation |
Plot simulated taxonomy
Description
This function is adapted from the ape function plot.phylo
used to plot phylogenetic trees.
The function can be used to plot simulated taxonomy along with the corresponding tree.
Usage
## S3 method for class 'taxonomy'
plot(
x,
tree,
show.mode = TRUE,
show.legend = TRUE,
legend.position = "bottomleft",
root.edge = TRUE,
hide.edge = FALSE,
edge.width = 1,
show.tip.label = FALSE,
align.tip.label = FALSE,
taxa.palette = "viridis",
cex = 1.2,
...
)
Arguments
x |
Taxonomy object. |
tree |
Phylo object. |
show.mode |
Indicate speciation mode. |
show.legend |
Add a legend for the symbols indicating different speciation modes. |
legend.position |
Position of the legend. Options include |
root.edge |
If TRUE include the root edge (default = TRUE). |
hide.edge |
If TRUE hide the root edge but still incorporate it into the automatic timescale (default = FALSE). |
edge.width |
A numeric vector giving the width of the branches of the plotted phylogeny. These are taken to be in the same order as the component edge of |
show.tip.label |
Whether to show the tip labels on the phylogeny (defaults to FALSE). |
align.tip.label |
A logical value or an integer. If TRUE, the tips are aligned and dotted lines are drawn between the tips of the tree and the labels. If an integer, the tips are aligned and this gives the type of the lines (lty). |
taxa.palette |
Colour palette used for taxa. Colours are assigned to taxa using the function |
cex |
Numeric value giving the factor used to scale the points representing the fossils when |
... |
Additional parameters to be passed to |
Examples
set.seed(123)
## simulate tree
t = TreeSim::sim.bd.taxa(8, 1, 1, 0.3)[[1]]
## simulate taxonomy
s = sim.taxonomy(t, 0.5, 1)
## plot the output
plot(s, t)