| plot_eha_log2 | R Documentation |
Plot wavelet scalogram using the outcome of the eha_log2 function.
plot_eha_log2(
eha_log2 = NULL,
plot_opt = "Amplitude",
lowerPeriod = NULL,
upperPeriod = NULL,
n.levels = 100,
palette_name = "rainbow",
color_brewer = "grDevices",
useRaster = TRUE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
keep_editable = FALSE,
dev_new = TRUE,
plot_dir = TRUE,
add_lines = NULL,
add_points = NULL,
add_abline_h = NULL,
add_abline_v = NULL,
add_MTM_peaks = FALSE,
add_data = TRUE,
add_avg = FALSE,
pval_abline = c(0.1, 0.05),
pval_cutoff = c(0.1),
add_MTM = FALSE,
mtm_siglvl = 0.95,
demean_mtm = TRUE,
detrend_mtm = TRUE,
padfac_mtm = 5,
tbw_mtm = 3,
plot_horizontal = TRUE
)
eha_log2 |
eha_log2 object created using the |
plot_opt |
plot options are "Power", "Amplitude", "Probability" or "F_test" |
lowerPeriod |
Lowest period value which will be plotted |
upperPeriod |
Highest period value which will be plotted |
n.levels |
Number of color levels |
palette_name |
Name of the color palette which is used for plotting.
The color palettes than can be chosen depends on which the R package is specified in
the color_brewer parameter. The included R packages from which palettes can be chosen
from are; the 'RColorBrewer', 'grDevices', 'ColorRamps' and 'Viridis' R packages.
There are many options to choose from so please
read the documentation of these packages |
color_brewer |
Name of the R package from which the color palette is chosen from.
The included R packages from which palettes can be chosen
are; the RColorBrewer, grDevices, ColorRamps,scico and Viridis R packages.
There are many options to choose from so please
read the documentation of these packages. " |
useRaster |
Plot as a raster or vector image |
periodlab |
Label for the y-axis |
x_lab |
Label for the x-axis |
keep_editable |
Keep option to add extra features after plotting |
dev_new |
Opens a new plotting window to plot the plot, this guarantees a "nice" looking plot however when plotting in an R markdown
document the plot might not plot |
plot_dir |
The direction of the proxy record which is assumed for tuning if time increases with increasing depth/time values
(e.g. bore hole data which gets older with increasing depth ) then plot_dir should be set to TRUE
if time decreases with depth/time values (eg stratospheric logs where 0m is the bottom of the section)
then plot_dir should be set to FALSE |
add_lines |
Add lines to the wavelet plot input should be matrix with first axis being depth/time the columns after that
should be period values |
add_points |
Add points to the wavelet plot input should be matrix with first axis being depth/time and columns after that
should be period values |
add_abline_h |
Add horizontal lines to the plot. Specify the lines as a vector e.g. c(2,3,5,6) |
add_abline_v |
Add vertical lines to the plot. Specify the lines as a vector e.g. c(2,3,5,6) |
add_MTM_peaks |
Add the MTM peak periods as horizontal lines |
add_data |
Plot the data on top of the wavelet |
add_avg |
Plot the average wavelet spectral power to the side of the wavelet |
pval_abline |
p value of the abline |
pval_cutoff |
p value cutoff below which no data is displayed |
add_MTM |
Add the MTM plot next to the wavelet plot |
mtm_siglvl |
select the significance level (0-1) for the MTM spectrum |
demean_mtm |
Remove mean from data before conducting the MTM analysis |
detrend_mtm |
Remove mean from data before conducting the MTM analysis |
padfac_mtm |
Pad factor for the MTM analysis |
tbw_mtm |
time bandwidth product of the MTM analysis |
plot_horizontal |
plot the wavelet horizontal or vertical eg y axis is depth or y axis power |
The output is a plot of a EHA spectra. if add_MTM_peaks = TRUE then the output of the MTM analysis will given as matrix
Code based on the wt.image" functions of the 'WaveletComp' R package The EHA and MTM analysis parts are from the astrochron R package of Meyers et al., (2012)
Angi Roesch and Harald Schmidbauer (2018). WaveletComp: Computational Wavelet Analysis. R package version 1.1. https://CRAN.R-project.org/package=WaveletComp
S.R. Meyers, 2012, Seeing Red in Cyclic Stratigraphy: Spectral Noise Estimation for Astrochronology: Paleoceanography, 27, PA3228, <doi:10.1029/2012PA002307>
S.R. Meyers, 2019 Cyclostratigraphy and the problem of astrochronologic testing, Earth-Science Reviews, Volume 190, <doi.org/10.1016/j.earscirev.2018.11.015.>
#Example 1. A plot of a wavelet spectra using the Total Solar Irradiance
# data set of Steinhilber et al., (2012)
TSI_eha_log2 <- eha_log2(data = TSI,
win = 8192,
tbw = 4,
demean = TRUE,
detrend = TRUE,
upperPeriod = 8192,
lowerPeriod = 50,
pad = NULL,
padding = "noise")
plot_eha_log2(
eha_log2 = TSI_eha_log2,
plot_opt = "Amplitude",
lowerPeriod = 50,
upperPeriod = 8192,
n.levels = 100,
palette_name = "rainbow",
color_brewer = "grDevices",
useRaster = TRUE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
keep_editable = FALSE,
dev_new = TRUE,
plot_dir = TRUE,
add_lines = NULL,
add_points = NULL,
add_abline_h = NULL,
add_abline_v = NULL,
add_MTM_peaks = FALSE,
add_data = TRUE,
add_avg = FALSE,
add_MTM = FALSE,
mtm_siglvl = 0.95,
demean_mtm = TRUE,
detrend_mtm = TRUE,
padfac_mtm = 5,
tbw_mtm = 3,
plot_horizontal = TRUE)
#Example 2. A plot of a wavelet spectra using the magnetic susceptibility
#data set of Pas et al., (2018)
mag_eha_log2 <- eha_log2(data = mag,
win = 50,
tbw = 4,
demean = TRUE,
detrend = TRUE,
upperPeriod = 50,
lowerPeriod = 1,
pad = NULL,
padding = "noise")
plot_eha_log2(
eha_log2 = mag_eha_log2,
plot_opt = "Amplitude",
lowerPeriod = 1,
upperPeriod = 50,
n.levels = 100,
palette_name = "rainbow",
color_brewer = "grDevices",
useRaster = TRUE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
keep_editable = FALSE,
dev_new = TRUE,
plot_dir = TRUE,
add_lines = NULL,
add_points = NULL,
add_abline_h = NULL,
add_abline_v = NULL,
add_MTM_peaks = FALSE,
add_data = TRUE,
add_avg = FALSE,
add_MTM = FALSE,
mtm_siglvl = 0.95,
demean_mtm = TRUE,
detrend_mtm = TRUE,
padfac_mtm = 5,
tbw_mtm = 3,
plot_horizontal = TRUE)
#Example 3. A plot of a wavelet spectra using the greyscale
# data set of Zeeden et al., (2013)
grey_eha_log2 <- eha_log2(data = grey,
win = 20,
tbw = 4,
demean = TRUE,
detrend = TRUE,
upperPeriod = 20,
lowerPeriod = 1,
pad = NULL,
padding = "noise")
plot_eha_log2(
eha_log2 = grey_eha_log2,
plot_opt = "Amplitude",
lowerPeriod = 1,
upperPeriod = 20,
n.levels = 100,
palette_name = "rainbow",
color_brewer = "grDevices",
useRaster = TRUE,
periodlab = "Period (metres)",
x_lab = "depth (metres)",
keep_editable = FALSE,
dev_new = TRUE,
plot_dir = TRUE,
add_lines = NULL,
add_points = NULL,
add_abline_h = NULL,
add_abline_v = NULL,
add_MTM_peaks = FALSE,
add_data = TRUE,
add_avg = FALSE,
add_MTM = FALSE,
mtm_siglvl = 0.95,
demean_mtm = TRUE,
detrend_mtm = TRUE,
padfac_mtm = 5,
tbw_mtm = 3,
plot_horizontal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.