LBN_bin_plot: Biomass size spectrum plot for binned data demonstrating...

View source: R/plotting.R

LBN_bin_plotR Documentation

Biomass size spectrum plot for binned data demonstrating uncertainties

Usage

LBN_bin_plot(
  binValsTibble = NULL,
  binBreaks = NULL,
  binCounts = NULL,
  b.MLE,
  b.confMin,
  b.confMax,
  plot.binned.fitted = TRUE,
  log.xy = "xy",
  xLim = NA,
  yLim = NA,
  rect.col = "grey",
  logLabels = FALSE,
  xLabel.small = c(2, 5, 20, 50, 200, 500),
  yLabel.small = c(5, 50, 500),
  xLab = expression(paste("Body mass ", italic(x), "(g)")),
  yLab = "Normalised biomass",
  x.PLB = NA,
  legend = TRUE,
  leg.pos = "topright",
  inset = c(0, 0),
  leg.text = "(a)",
  ...
)

Arguments

binValsTibble

tibble of binned data with each row representing a bin and with columns binMin and binMmax (min and max break of each bin) and binCount (count in that bin), as in the binVals component of the output of binData. wmin and wmax can also be used instead of binMin and binMax. Extra columns are ignored.

binBreaks

vector of bin breaks

binCounts

vector of bin counts

b.MLE

maximum likelihood estimate of b (ideally from the MLEbin method)

b.confMin

lower 95\

\item

b.confMaxupper 95\

\item

plot.binned.fittedif TRUE then also plot the estimated normalised biomass in each bin for the MLE of b and it's confidence limits

\item

log.xyWhich axes to log, for plot(..., log = log.xy). So "xy" for log-log axes, "x" for only x-axis logged, "" for both axes unlogged.

\item

x.PLBvector of values to use to plot the fitted PLB curve; if NA then automatically calculated

\item

legendif TRUE then add legend

\item

leg.posposition of legend, from "bottomright"', '"bottom"', '"bottomleft"', '"left"', '"topleft"', '"top"', '"topright"', '"right"' and '"center"'.

\item

insetinset distance vector for legend

\item

leg.texttext for legend

\item

...further arguments to be passed to plot() and plot_binned_fitted() TODO should return a tibble of results Biomass size spectrum plot for binned data, showing the bin widths explicitly and the normalised biomass in each bin (with resulting uncertainties). So extending MEE Fig. 6 for already binned data, using a new approach motivated by MEPS Fig. 7. Should probably then be recommended to replace MEE Fig. 6. Axes are logged, and labelled as either logged or (more intuitive) logged values. See vignette MLEbin_recommend.Rmd. Bin breaks and counts are input as EITHER a single tibble binValsTibble with each row representing a bin, OR as vectors binBreaks and binCounts. Andrew Edwards


andrew-edwards/sizeSpectra documentation built on June 28, 2023, 7:09 p.m.