Plot a a single spectrum, with confidence limits (no age ensemble). Useful for comparison with plotSpectraEns() in cases of no age uncertainty (e.g. GCM output)

plotSpectrum(
  spec.df,
  cl.df = NULL,
  x.lims = NULL,
  x.ticks = c(10, 20, 50, 100, 200, 500, 1000),
  y.lims = NULL,
  color.line = "black",
  color.cl = "red"
)

Arguments

spec.df

list or dataframe containing frequency (freq) and power (pwr)

cl.df

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

x.lims

range of plotted periodicities

x.ticks

ticks to mark on the period axis. if NULL, defaults to (10, 20, 50, 100, 200, 500, 1000)

y.lims

2-vector for the y-axis. If NULL, computed from range(pwr)

color.line

color of the line representing the spectrum

color.cl

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

Value

a ggplot object

Author

Julien Emile-Geay