Learn R Programming

mizer (version 3.0.0)

plot_cdf: Build the cumulative-distribution plot

Description

Internal worker shared by the plotCDF() methods. It integrates the spectra data over size (optionally normalising), converts to a length axis if requested, and either returns the data or draws the plot via plotDataFrame().

Usage

plot_cdf(
  plot_dat,
  params,
  power,
  normalise,
  log_x,
  log_y,
  wlim,
  llim,
  ylim,
  highlight,
  size_axis,
  return_data
)

Value

A mizer_plot (ggplot2) object, or the data frame if return_data = TRUE.

Arguments

plot_dat

Spectra plotting data as produced for plotSpectra().

params

A MizerParams object.

power

The power of weight that the abundance was multiplied by, used for the y-axis label.

normalise

If TRUE, each curve is divided by its final value.

log_x, log_y

Logical flags for log10 axes.

wlim, llim

Numeric vectors of length two giving the weight and length limits.

ylim

Numeric vector of length two giving the y-axis limits.

highlight

Name or vector of names of species to be highlighted.

size_axis

Either "w" (weight) or "l" (length).

return_data

If TRUE, return the cumulative-distribution data frame instead of the plot.