| convert_plot_density_axis | R Documentation |
Converts the size coordinate of the plotting data to the requested axis and,
when the values are a density, multiplies them by the Jacobian that restates
them in the density measure that axis calls for (see
density_target_measure()). Values that are not a density are left alone.
convert_plot_density_axis(
plot_dat,
params,
size_axis,
density_wrt = NA_character_,
per_log_size = NULL,
species_col = "Species",
value_col = 2
)
plot_dat |
A data frame of plotting data with a |
params |
A MizerParams object providing the weight-length parameters. |
size_axis |
Either |
density_wrt |
The measure the values are a density with respect to, see
density_measures. |
per_log_size |
Whether to express the values per logarithmic size.
|
species_col |
Name of the column identifying the species. Default is
|
value_col |
Name or index of the value column. Defaults to the second column. |
Anything involving a length is a per-species quantity, because the weight-length relationship is, so rows whose species is not one of the model's species — the "Total" row, for instance — are dropped when a length is needed. Going from a density per size to one per logarithmic size needs no length, and keeps those rows.
The plotting data with its size coordinate, and where called for its values, expressed for the requested axis. The size coordinate is the first column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.