plot_growth | R Documentation |
Plot von Bertalanffy or length-weight fits
plot_growth(
object_female,
object_male,
object_all,
type = c("vb", "length-weight"),
downsample = 2000L,
pt_alpha = 0.2,
xlab = "Age (years)",
ylab = "Length (cm)",
seed = 42,
lab_x = 0.45,
lab_y = 0.3,
lab_x_gap = 0.3,
lab_y_gap = 0.06,
col = c(Female = "black", Male = "grey40"),
french = FALSE,
jitter = FALSE
)
plot_vb(..., type = "vb")
plot_length_weight(
...,
type = "length-weight",
xlab = "Length (cm)",
ylab = "Weight (kg)",
lab_x = 0.1,
lab_y = 0.9,
lab_x_gap = 0.35,
french = FALSE
)
object_female |
Output from |
object_male |
Output from |
object_all |
Output from |
type |
von Bertalanffy or length-weight fits? |
downsample |
Downsample the individual fish to plot down to this number. |
pt_alpha |
Transparency for the points. |
xlab |
Label for the x axis. |
ylab |
Label for the y axis. |
seed |
A random seed value that only comes into play for downsampling. |
lab_x |
Fraction from left to place text labels. |
lab_y |
Fraction from bottom to place text labels. |
lab_x_gap |
Horizontal gap between text labels. |
lab_y_gap |
The vertical gap between text labels. |
col |
A named character vector declaring the colors for female and male |
french |
Logical. |
jitter |
Logical, whether to jitter data points. |
... |
Arguments to pass to |
You can include object_female
and/or object_male
or object_all
depending on whether the model was fit to female, male, or both sexes
combined.
## Not run:
# d <- gfdata::get_survey_samples("pacific ocean perch")
d <- pop_samples
model_f <- fit_length_weight(d, sex = "female")
model_m <- fit_length_weight(d, sex = "male")
plot_length_weight(object_female = model_f, object_male = model_m)
model_f <- fit_vb(d, sex = "female")
model_m <- fit_vb(d, sex = "male")
plot_vb(object_female = model_f, object_male = model_m)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.