Learn R Programming

eseis (version 0.8.0)

plot_event: Create a comprehensive multi panel plot of a seismic waveform

Description

The function creates from an input waveform a multi panel plot, including a seismogram, spectrum and spectrogram, and additional frequency statistics information.

Usage

plot_event(data, ratio = c(0.3, 0.3), ...)

Value

Graphic output of an event waveform.

Arguments

data

eseis object, or numeric vector, data set to be plotted.

ratio

Numeric vector of length two, ratios of the plot panels, i.e. in horizonal and vertical direction. Default is c(0.3, 0.3).

...

Additional arguments passed to the plot function. See details for further information

Author

Michael Dietze

Details

Note that plot generation time can get long when other than short events are passed to the function. The axes limits can only be changed for the spectrum and spectrogram plots, ylim affects the frequency range, zlim affects the spectral power range.

The function uses the native plot function plot_signal(), plot_spectrum() and plot_spectrogram() along with signal_stats() to build a four panel plot.

Examples

Run this code

if (FALSE) {

## load and deconvolve example event
data(rockfall)
rockfall_eseis <- signal_deconvolve(rockfall_eseis)

## plot event straight away
plot_event(data = rockfall_eseis)

## plot event with adjusted parameters
plot_event(data = rockfall_eseis, 
           ratio = c(0.4, 0.3),
           method = "periodogram",
           n = 100, 
           window = 6,
           overlap = 0.8, 
           window_sub = 4, 
           overlap_sub = 0.8,
           format ="%M:%S", 
           col = "jet",
           ylim = c(5, 80),
           zlim = c(-170, -100))
}

Run the code above in your browser using DataLab