View source: R/richness_evenness.R
| plot_richness_evenness | R Documentation |
Creates a polished dual Y-axis line chart to visualize clonal richness and evenness over time, with automatic scaling between axes, customizable styling, and optional data labels. All core functionality and parameters remain identical to the original code - only namespace prefixes (::) added.
plot_richness_evenness(
PMD_data,
time_col = "Time",
richness_col = "Richness",
evenness_col = "Eveness",
plot_title = "Clonal eveness over time",
subtitle = NULL,
richness_color = "#3366CC",
evenness_color = "#CC6677",
show_labels = TRUE,
Timelevels = NULL
)
PMD_data |
Data frame containing time, richness, and evenness data (required columns specified by time_col/richness_col/evenness_col) |
time_col |
Character (default = "Time"). Name of column containing time points. |
richness_col |
Character (default = "Richness"). Name of column containing richness values. |
evenness_col |
Character (default = "Eveness"). Name of column containing evenness values (note: intentional spelling match to original code). |
plot_title |
Character (default = "Clonal eveness over time"). Main plot title (spelling preserved as original). |
subtitle |
Character (optional). Plot subtitle (default = NULL). |
richness_color |
Character (default = "#3366CC"). Hex color code for richness line/points/labels. |
evenness_color |
Character (default = "#CC6677"). Hex color code for evenness line/points/labels. |
show_labels |
Logical (default = TRUE). Whether to display numeric labels on data points. |
Timelevels |
Character vector (optional). Custom ordered levels for time factor (overrides default ordering). |
ggplot object. Dual Y-axis line chart of richness (primary) and evenness (secondary) over time.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.