View source: R/plot_components.R
plot_components | R Documentation |
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).
plot_components(data, type = "2D", order = "xyz", ...)
data |
|
type |
|
order |
|
... |
Further arguments passed to the plot function. |
The plot type type = "3D"
requires the package plot3D
being installed. The plot type type = "scene"
requires the
package rgl
being installed.
A plot
Michael Dietze
## 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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.