| plot_spectra | R Documentation |
Internal worker shared by the plotSpectra() methods. It assembles the
plotting data frame from the species and resource abundances, applies the
size and abundance limits, optionally converts to a length axis, and either
returns the data or draws the plot via plotDataFrame().
plot_spectra(
params,
n,
n_pp,
species,
wlim,
llim,
ylim,
power,
biomass = power >= 1,
per_log_size = power == 2,
total,
resource,
background,
highlight,
log_x,
log_y,
size_axis,
return_data
)
params |
A MizerParams object. |
n |
Array of species abundances (species by size). |
n_pp |
Vector of resource abundance. |
species |
The species to be plotted. |
wlim, llim |
Numeric vectors of length two giving the weight and length limits. |
ylim |
Numeric vector of length two giving the y-axis limits. |
power |
The abundance is multiplied by weight raised to this power. |
biomass |
Whether the resulting quantity is a biomass density rather than a number density. Used for the y-axis label. |
per_log_size |
Whether the resulting quantity is a density with respect to logarithmic size. Used for the y-axis label and for the Jacobian of the conversion to a length axis. |
total |
Whether to include the total community abundance. |
resource |
Whether to include the resource spectrum. |
background |
Whether to include background species. |
highlight |
Name or vector of names of species to be highlighted. |
log_x, log_y |
Logical flags for log10 axes. |
size_axis |
Either |
return_data |
If |
A mizer_plot (ggplot2) object, or the plotting data frame if
return_data = TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.