plot_signal: Plot a seismic signal

View source: R/plot_signal.R

plot_signalR Documentation

Plot a seismic signal

Description

This function plots a line graph of a seismic signal. To avoid long plot preparation times the signal is reduced to a given number of points.

Usage

plot_signal(data, time, n = 10000, ...)

Arguments

data

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

time

POSIXct vector, corresponding time vector.

n

Numeric value, number of values to which the dataset is reduced. Default is 10000.

...

Further arguments passed to the plot function.

Details

The format argument is based on hints provided by Sebastian Kreutzer and Christoph Burow. It allows plotting time axis units in user defined formats. The time format must be provided as character string using the POSIX standard (see documentation of strptime for a list of available keywords), e.g., " "

Value

A line plot of a seismic wave form.

Author(s)

Michael Dietze

Examples


## load example data set
data(rockfall)

## plot data set straightforward
plot_signal(data = rockfall_eseis)

## plot data set with lower resolution
plot_signal(data = rockfall_eseis, n = 100)

## plot data set but not as an eseis object
plot_signal(data = rockfall_z, time = rockfall_t)

## load earthquake data set
data(earthquake)

## plot all three components (after changing plot options)
pars <- par(no.readonly = TRUE)
par(mfcol = c(3, 1))

plt <- lapply(s, plot_signal, t = t)

par(pars)


coffeemuggler/eseis documentation built on Aug. 19, 2023, 9:57 p.m.