PlotSNR: Plot proxy signal-to-noise ratios

View source: R/plotting.R

PlotSNRR Documentation

Plot proxy signal-to-noise ratios

Description

Plot proxy signal-to-noise ratios of several datasets as a function of timescale (e.g., as in the firn core analysis of Münch and Laepple, 2018, Fig. 3).

Usage

PlotSNR(
  spec,
  f.cut = FALSE,
  names = NULL,
  col = 1:length(spec),
  xlim = c(500, 2),
  ylim = c(0.05, 5),
  xlab = "Time period (yr)",
  ylab = "Signal-to-Noise Ratio",
  xtm = NULL,
  ytm = NULL,
  xtl = NULL,
  ytl = NULL
)

Arguments

spec

a (named) list of signal-to-noise ratio data sets: each dataset itself should be list containing at least the spectral object (?spec.object) snr providing signal-to-noise ratios as a function of frequency. For Figure 3 in Münch and Laepple (2018) set spec to the output from PublicationSNR.

f.cut

Shall the spectra be cut at the cutoff frequency constrained by the diffusion correction strength? Defaults to FALSE.

names

an optional character vector of names of the proxy data sets. If NULL, the names of spec are used or, if not present, default names.

col

a numeric or character vector of colors to use for the plotting with length recycled to match length(spec).

xlim

the x limits (x1, x2) of the plot.

ylim

the y limits (y1, y2) of the plot.

xlab

x axis label.

ylab

y axis label.

xtm

x axis tick mark positions; if NULL computed by axis.

ytm

y axis tick mark positions; default setting (NULL) uses c(0.05, 0.1, 0.5, 1, 5).

xtl

x axis tick mark labels; if NULL determined automatically from xtm, else it must be a vector of labels of the same length as xtm.

ytl

equivalent to xtl for the y axis tick mark labels.

Author(s)

Thomas Münch

References

Münch, T. and Laepple, T.: What climate signal is contained in decadal- to centennial-scale isotope variations from Antarctic ice cores? Clim. Past, 14, 2053–2070, https://doi.org/10.5194/cp-14-2053-2018, 2018.

See Also

spec.object for the definition of a proxysnr spectral object.

Examples

# create toy data
n <- 100
spec <- list(
  data1 = list(snr = list(freq = seq(0.01, 0.5, length.out = n),
                          spec = seq(1, 0.1, length.out = n))),
  data2 = list(snr = list(freq = seq(0.005, 0.5, length.out = n),
                          spec = seq(5, 0.1, length.out = n)))
)

# plot SNR data
PlotSNR(spec)

EarthSystemDiagnostics/proxysnr documentation built on June 9, 2025, 11:58 a.m.