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,
total,
resource,
background,
highlight,
log_x,
log_y,
size_axis,
return_data
)A mizer_plot (ggplot2) object, or the plotting data frame if
return_data = TRUE.
A MizerParams object.
Array of species abundances (species by size).
Vector of resource abundance.
The species to be plotted.
Numeric vectors of length two giving the weight and length limits.
Numeric vector of length two giving the y-axis limits.
The abundance is multiplied by weight raised to this power.
Whether to include the total community abundance.
Whether to include the resource spectrum.
Whether to include background species.
Name or vector of names of species to be highlighted.
Logical flags for log10 axes.
Either "w" (weight) or "l" (length).
If TRUE, return the plotting data frame instead of the
plot.