mds_plot {ontophylo} | R Documentation |
Plot morphospace from MDS
Description
Wrapper function for plotting morphospaces obtained using the MultiScale.simmap' function.
Usage
mds_plot(MD, Tslice = max(MD$Points$time))
Arguments
MD |
list. A list with the morphospace information obtained using the 'MultiScale.simmap' function. |
Tslice |
numeric. The value for the temporal slices to be plotted, from root to tip. For example, if Tslice = 25, then all points in the morphospaces from time 0 (root) to 25 will be plotted. |
Value
An object of class ggplot with the morphospace to be plotted.
Author(s)
Diego Porto
Examples
# Select a few taxa from main lineages of Hymenoptera.
tax <- c("Xyela", "Tenthredo", "Orussus", "Pimpla",
"Ceraphron", "Evania", "Pison",
"Ibalia", "Proctotrupes", "Chiloe")
drop_tax <- hym_stm_mds$tip.label[!hym_stm_mds$tip.label %in% tax]
hym_stm_mds <- phytools::drop.tip.simmap(hym_stm_mds, drop_tax)
# Get a sample of amalgamated stochastic map (phenome).
tree <- merge_tree_cat(hym_stm_mds)
# Multidimensional scaling for an arbitrary tree.
MD <- suppressWarnings(MultiScale.simmap(tree))
MD_plot <- mds_plot(MD, Tslice = 10)
MD_plot
MD_plot <- mds_plot(MD, Tslice = 50)
MD_plot
MD_plot <- mds_plot(MD, Tslice = 200)
MD_plot
MD_plot <- mds_plot(MD, Tslice = 280)
MD_plot
[Package ontophylo version 1.1.3 Index]