Plot catch composition
plot_catch_comp(
dat,
facet = NULL,
era = "time",
unit_label = "mt",
scale_amount = 1,
proportional = TRUE,
interactive = TRUE,
module = NULL,
make_rda = FALSE,
figures_dir = getwd()
)A data frame returned from convert_output
a string or vector of strings of column(s) that groups the data (e.g. "fleet", "sex", "area", etc.). Set facet = "none" to summarize the data in a single plot.
a string naming the era of data such as historical ("early"), current ("time"), or projected ("fore") data if filtering should occur. Default is set to "time" which is the current time. To plot all data, set era to NULL.
indicate the name of the units of catch as to label the axis
A number describing how much to scale down the catch at age. Please choose a value ranging from 1-1,000,000,000 (one billion) in orders of magnitude (e.g., 1, 10, 100, 1000, etc.). For example, scale_amount = 100 would scale down a value from 500,000 –> 5,000 and would report catch in hundreds of the 'unit_label'. This scale will be reflected in the legend label if proportional is set to FALSE. The default is 1.
Set size of points relative to z when TRUE, point size are relative to one another while when set to FALSE, point size is relative to z
TRUE/FALSE; indicate whether the environment in which the function is operating is interactive. This bypasses some options for filtering when preparing data for the plot. Default is FALSE.
(Optional) A string indicating the linked module_name associated with the label for the plot if known. Default is NULL. By default, the function will select the most relevant module if more than 1 exists.
TRUE/FALSE; indicate whether to produce an .rda file containing a list with the figure/table, caption, and alternative text (if figure). If TRUE, the .rda will be exported to the folder indicated in the argument "rda_dir". Default is FALSE.
The location of the folder containing the generated .rda files ("rda_files") that will be created if the argument `make_rda` = TRUE. Default is the working directory.
A plot ready for a stock assessment report of catch or landings composition. This plot is made only when catch or landings are explicitly named in the output file. The current plot function does not combine all sources of catch.
plot_catch_comp(
dat = stockplotr:::example_data,
facet = "fleet",
unit_label = "mt",
scale_amount = 100,
interactive = FALSE,
make_rda = FALSE,
figures_dir = getwd()
)
#> ! Multiple module names found in data.
#> ℹ Environment not interactive. Selecting CATCH_AT_AGE.
plot_catch_comp(
dat = stockplotr:::example_data,
facet = "none",
unit_label = "mt",
scale_amount = 100,
interactive = FALSE,
era = "fore",
proportional = FALSE
)
#> ! Multiple module names found in data.
#> ℹ Environment not interactive. Selecting CATCH_AT_AGE.