View source: R/ArraySpeciesBySize-class.R
| ArraySpeciesBySize_plot_data | R Documentation |
Everything a plot of an ArraySpeciesBySize needs, prepared once: the
species selection, the background grouping, the masking of sizes outside a
species' own range, the weight limits, the conversion of the values and of
the size coordinate onto the requested axis, the total line, and the length
limits.
ArraySpeciesBySize_plot_data(
x,
species = NULL,
all.sizes = FALSE,
wlim = c(NA, NA),
llim = c(NA, NA),
total = FALSE,
background = TRUE,
size_axis = "w",
per_log_size = NULL
)
x |
An |
species |
Character vector of species to include, or |
all.sizes |
If |
wlim |
Numeric vector of length two giving the weight limits. |
llim |
Numeric vector of length two giving the length limits, applied only on a length axis. |
total |
Whether to append the total line, see |
background |
Whether background species are included. |
size_axis |
Either |
per_log_size |
Whether to express a density per logarithmic size. |
All of it uses the array's own params. That matters for the comparison
plots, where the two operands may come from different models: a length axis
and a density Jacobian are both built from the weight-length relationship of
the model the values came from, so preparing the second array with the first
one's parameters would put it in the wrong place on the axis. Each operand is
therefore prepared here, on its own, and the comparison renderers receive
data that is already on the axis it will be drawn against.
A data frame with the size coordinate in its first column, the values
in its second, and Species and Legend columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.