Description Usage Arguments Value Examples
A function to plot a jittered scatterplot of (model-averaged) diversification rates in the alternative states.
1 2 3 4 5 6 7 8 9 | m_scatterplot_cp(
processed_recon,
parameter = "turnover",
focal_character = c("prob_0x", "prob_x0"),
focal_character_label,
second_character_label,
colors,
plot_as_waiting_time = FALSE
)
|
processed_recon |
An object produced with |
parameter |
The diversification parameter to be plotted on the y axis. Possible options are turnover, extinct.frac, net.div, speciation, extinction |
focal_character |
Specifies the x axis. Either |
focal_character_label |
Label for the x axis of the scatterplot and two-dimensional color gradient. This should match the focal probability. |
second_character_label |
Label for the y axis of the scatterplot and two-dimensional color gradient. |
colors |
A vector of three colors in the order: (1) zero color (color when the two traits are in state 0), (2) horizontal_color (color to interpolate towards state 1 of the focal character) and (2) vertical_color (color to interpolate towards state 1 of the second character). See |
plot_as_waiting_time |
Logical, whether to convert the rate to waiting time (1/rate) |
A scatterplot with focal probability (0 or 1) on the x axis and the chosen diversification parameter on the y axis with means and error bars (mean +/- SD) for each state color coded with in two-dimensional colorplane.
1 2 3 4 5 6 7 8 9 10 11 12 | library("colorplaner")
data("diatoms")
processed_muhisse <- m_process_recon(muhisse_recon=diatoms$muhisse_recon)
m_scatterplot_cp(
processed_recon = processed_muhisse,
parameter = "turnover",
focal_character = "prob_0x",
focal_character_label = "p(mar)",
second_character_label = "p(pla)",
colors = c("#21908CFF", "#440154FF", "#FDE725FF"),
plot_as_waiting_time = TRUE) +
labs(y="Net turnover\n(waiting time in millions of years)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.