Plot the weight-length relationship using ggplot2::ggplot. Sex-specific relationships are plotted if available using shades of gray. Note that sex can be missing and a single relationship for all data will be plotted.

plotWL(
  length,
  sex,
  weight,
  weight.calc,
  xlab = "Length (cm)",
  ylab = "Weight (kg)"
)

Arguments

length

A vector of fish lengths in mm.

sex

A vector of sexes for each entry in length. Entries must be one of the following: 'U', 'F', 'M', or 'H'.

weight

A vector of empirical weights in kilograms.

weight.calc

A vector of estimated weights output from getweight.

xlab, ylab

A character value specifying the label for an axes of a figure. This is typically passed to ggplot2::xlab or ggplot2::ylab but it can also be passed to the xlab or ylab arguments of plot. No additional formatting will take place.

See also

getWLpars to calculate parameters of the weight-length relationship; getweight to predict weights from empirical lengths

Author

Kelli F. Johnson