plotDiversityCurve {alakazam} | R Documentation |
Plot the results of alphaDiversity
Description
plotDiversityCurve
plots a DiversityCurve
object.
Usage
plotDiversityCurve(
data,
colors = NULL,
main_title = "Diversity",
legend_title = "Group",
log_x = FALSE,
log_y = FALSE,
xlim = NULL,
ylim = NULL,
annotate = c("none", "depth"),
score = c("diversity", "evenness"),
silent = FALSE,
...
)
Arguments
data |
DiversityCurve object returned by alphaDiversity. |
colors |
named character vector whose names are values in the
|
main_title |
string specifying the plot title. |
legend_title |
string specifying the legend title. |
log_x |
if |
log_y |
if |
xlim |
numeric vector of two values specifying the
|
ylim |
numeric vector of two values specifying the
|
annotate |
string defining whether to added values to the group labels
of the legend. When |
score |
one of |
silent |
if |
... |
additional arguments to pass to ggplot2::theme. |
Value
A ggplot
object defining the plot.
See Also
See alphaDiversity and alphaDiversity for generating DiversityCurve objects for input. Plotting is performed with ggplot.
Examples
# Calculate diversity
div <- alphaDiversity(ExampleDb, group="sample_id", nboot=100)
# Plot diversity
plotDiversityCurve(div, legend_title="Sample")
# Plot diversity
plotDiversityCurve(div, legend_title="Sample", score="evenness")