plot_components: Plot three seismic components against each other

View source: R/plot_components.R

plot_componentsR Documentation

Plot three seismic components against each other

Description

The function visualises the time evolution of three seismic components of the same signal against each other as line graphs. There are three different visualisation types available: 2D (a panel of three 2D plots), 3D (a perspective threedimensional plot) and scene (an interactive threedimensional plot, mainly for exploratory purpose).

Usage

plot_components(data, type = "2D", order = "xyz", ...)

Arguments

data

List, data frame or matrix, seismic componenents to be processed. If data is a matrix, the components must be organised as columns. Also, data can be a list of eseis objects.

type

Character value, plot type. One out of "2D" (panel of three 2-dimensional plots), "3D" (perspective 3D plot) and "scene" (interactive 3D plot). Default is "2D".

order

Caracter value, order of the seismic components. Describtion must contain the letters "x","y" and "z" in the order according to the input data set. Default is "xyz" (NW-SE-vertical).

...

Further arguments passed to the plot function.

Details

The plot type type = "3D" requires the package plot3D being installed. The plot type type = "scene" requires the package rgl being installed.

Value

A plot

Author(s)

Michael Dietze

Examples


## load example data set
data(earthquake)

## filter seismic signals
s <- eseis::signal_filter(data = s, 
                          dt = 1/200, 
                          f = c(0.05, 0.1))

## integrate signals to get displacement
s_d <- eseis::signal_integrate(data = s, dt = 1/200)

## plot components in 2D
plot_components(data = s_d, 
                type = "2D")

## plot components with time colour-coded
plot_components(data = s_d, 
                type = "2D",
                col = rainbow(n = length(s$BHE)))

## plot components with used defined coulour ramp
col_user <- colorRampPalette(colors = c("grey20", "darkblue", "blue", 
                                        "green", "red", "orange"))

plot_components(data = s_d, 
                type = "2D",
                col = col_user(n = length(s$BHE)))

## plot components as 3D plot, uncomment to use
#plot_components(data = s_d, 
#                 type = "3D",
#                 col = rainbow(n = length(s$BHE)))
                

eseis documentation built on Aug. 10, 2023, 5:08 p.m.

Related to plot_components in eseis...