LLines: Add a spectrum to an existing log-log spectral plot.

View source: R/LPlot.R

LLinesR Documentation

Add a spectrum to an existing log-log spectral plot.

Description

This function adds a spectrum to an existing double-logarithmic plot and optionally adds a transparent confidence interval.

Usage

LLines(
  x,
  conf = TRUE,
  bPeriod = FALSE,
  col = "black",
  alpha = 0.3,
  removeFirst = 0,
  removeLast = 0,
  ...
)

Arguments

x

a spectral object resulting from a call to SpecMTM.

conf

if TRUE (the default) add a transparent confidence interval (suppressed if x contains no error limits).

bPeriod

if TRUE the x-axis is displayed in units of period (inverse frequency), increasing to the left. Defaults to FALSE.

col

color for the line plot and the confidence interval.

alpha

transparency level (between 0 and 1) for the confidence interval. Defaults to 0.3.

removeFirst

omit removeFirst values on the low frequency side.

removeLast

omit removeLast values on the high frequency side.

...

further graphical parameters passed to lines.

Author(s)

Thomas Laepple

See Also

Other functions to plot power spectra: LPlot(), gg_spec()

Examples

x <- ts(arima.sim(list(ar = 0.9), 1000))
spec <- SpecMTM(x)
LPlot(spec, col = "grey")
LLines(LogSmooth(spec), lwd = 2)

EarthSystemDiagnostics/paleospec documentation built on Feb. 17, 2024, 4:36 p.m.