plot_spectrogram {eseis} | R Documentation |
Plot spectrograms (power spectral density estimates)
Description
This function plots spectrograms of seismic signals. It uses the output
of signal_spectrogram
.
Usage
plot_spectrogram(data, legend = TRUE, keep_par = FALSE, agg = c(1, 1), ...)
Arguments
data |
|
legend |
|
keep_par |
|
agg |
|
... |
Additional arguments passed to the plot function. |
Details
As of version 0.7.2, the value range (zlim
) is no longer set to the
full data range but to the range between quantiles 0.01 and 0.99. For the
full value range to be plotted, use zlim = range(data$PSD$S)
.
As of version 0.7.2, the default plot colour has changed from the "jet"
colour palette to the "Inferno" palette. This due to perception issues with
the "jet" palette. If one wants to decisively use the "jet" colours, this
can be done by adding the keyword col = "jet"
. To use other
colour schemes, such as sequential HCL schemes from the
colorspace package, specify them as additional argument, e.g.
col = colorspace::sequential_hcl(200, palette = "Plasma")
,
col = colorspace::sequential_hcl(200, palette = "Inferno")
,
col = colorspace::sequential_hcl(200, palette = "Viridis")
.
Value
Graphic output of a spectrogram.
Author(s)
Michael Dietze
See Also
Examples
## load example data set
data(rockfall)
## deconvolve signal
rockfall <- signal_deconvolve(data = rockfall_eseis)
## calculate spectrogram
PSD <- signal_spectrogram(data = rockfall)
## plot spectrogram
plot_spectrogram(data = PSD)
## plot spectrogram with legend and labels in rainbow colours
plot_spectrogram(data = PSD,
xlab = "Time (min)",
ylab = "f (Hz)",
main = "Power spectral density estimate",
legend = TRUE,
zlim = c(-220, -70),
col = rainbow(100))
## plot spectrogram with frequencies in log scale
plot_spectrogram(data = PSD, log = "y")
## plot spectrogram with formatted time axis (minutes and seconds)
plot_spectrogram(data = PSD, format = "%M:%S")