Plots a timeline of presence/absence (and optionally relative quantity) of
the data sources contributing to an Rceattle model's likelihood, by year and
fleet. Modeled after Stock Synthesis's r4ss::SSplotData().
Usage
plot_data(
Rceattle,
file = NULL,
subplots = 1:2,
datatypes = "all",
fleets = "all",
species = "all",
ghost = FALSE,
fleetcol = "default",
width = 7,
height = 5,
res = 200,
ptsize = 10,
margins = c(5.1, 2.1, 2.1, 10.1),
cex = 2,
lwd = 12,
maxsize = 1,
alphasize = 1,
mainTitle = FALSE,
cex.main = 1
)Arguments
- Rceattle
Either a single Rceattle model object exported from
Rceattle::fit_mod(), or a rawdata_list(e.g. one of the bundled datasets such asBS2017MS).- file
Path/prefix used to save the figure. If
NULL(default) the plot is drawn to the active device only. When supplied, the figure is written topaste0(file, "_data_plot.png").- subplots, res, ptsize, margins, cex, lwd, maxsize, mainTitle, cex.main
Deprecated base-graphics arguments, retained for back-compatibility and ignored. One faceted figure is drawn; size, resolution and titles come from the ggplot theme and from
width/height.- datatypes
Either
"all"or a subset ofc("catch", "index", "agecomp", "lencomp", "caal", "diet").- fleets
Either
"all"or an integer vector ofFleet_codes to include. Diet "fleets" are encoded after the regular fleets (one per predator species).- species
Either
"all"or an integer vector of species indices to include.- ghost
Logical. If
TRUE, also include rows excluded from the likelihood (Year < 0). Defaults toFALSE.- fleetcol
Either
"default"or a vector of colors (one per fleet shown after subsetting). Diet entries get an additional color appended.- width, height
Figure dimensions in inches.
- alphasize
Bubble fill transparency (0-1).