Plot the output of `computeSpectraEns` as a ribbon plot of distributions, with specified confidence levels

plotSpectraEns(
  spec.ens,
  cl.df = NULL,
  x.lims = NULL,
  x.ticks = c(10, 20, 50, 100, 200, 500, 1000),
  y.lims = NULL,
  color.low = "white",
  color.high = "grey70",
  color.line = "Black",
  color.cl = "red",
  alp = 0.5
)

Arguments

spec.ens

list or dataframe containing frequency (freq) and power (pwr); typically output of computeSpectraEns

cl.df

list or dataframe containing confidence limits (90, 95 and 99%) as well as frequency (freq)

x.lims

2-element vector defining the range of periods (x-axis)

x.ticks

n-element vector of the periods labeled

y.lims

2-element vector defining the range of spectral power (y-axis)

color.low

Color of the outermost band; the extreme quantiles of the distribution

color.high

Color of the innermost band; the central quantiles of the distribution

color.line

Line color (following ggplot rules)

color.cl

color of the lines representing the confidence limits (90, 95, 99%)

alp

alpha (transparency) parameter for the ribbons

Value

a ggplot object

Details

`plotSpectraEns` re-uses `plotTimeseriesRibbons` and therefore the same graphical conventions. Spectra are plotted on a log-log scale, with the x-axis labeled by periods instead of frequencies, for improved intelligibility.

Author

Julien Emile-Geay