matsquiggle: Matrix Seismic Record

View source: R/matsquiggle.R

matsquiggleR Documentation

Matrix Seismic Record

Description

Plot a matrix of time series as a var-squiggle display (filled in half traces)

Usage

matsquiggle(XMAT, dt1, dist = NULL, thick = 1,
 FLIP = FALSE, filcol='blue', tracecol="black", add=FALSE, PLOT=TRUE,xpd=TRUE, plotdir=1 )

Arguments

XMAT

matrix of traces

dt1

sample interval, s

dist

distance for each trace in the matrix

thick

thickness for each trace to be plotted

FLIP

logical, FALSE (default) plot horizontal, TRUE=plot vertical

filcol

color for shading

tracecol

color for trace

add

add traces to existing plot

PLOT

whether to create a new plotting region

xpd

logical, set xpd parameter (see par)

plotdir

1=left to right, 0=right to left (default=1)

Details

see varsquiggle for more details

Value

side effects.

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

varsquiggle, varsquig

Examples



data(GH)
m <- match( GH$STNS,    GH$stafile$name)
LATS <- GH$stafile$lat[m]
LONS <- GH$stafile$lon[m]
dees <- rdistaz( GH$pickfile$LOC$lat, GH$pickfile$LOC$lon, LATS, LONS)

sel <- which(GH$COMPS=="V")
sel <- sel[order(dees$dist[sel])]

###  plot normal way:
### swig(GH, sel=sel, WIN=c(5,10), SHOWONLY=TRUE)


###  plot with varsquiggle
### varsquiggle(GH, sel=sel, WIN=c(5,10))

ex <- seq(from=0, by=GH$dt[sel[1]], length=length(GH$JSTR[[sel[1]]]))
wx <- ex>=5 & ex<=10
XMAT <- matrix(ncol=length(sel), nrow=length(which(wx)))

for(i in 1:length(sel))
{
XMAT[,i] <-  GH$JSTR[[sel[i]]][wx]

}


matsquiggle(XMAT, GH$dt[sel[1]] , dist = dees$dist[sel] , thick = 1,
FLIP = FALSE)

axis(1)
axis(2)
title(xlab="Time, s", ylab="Distance, km")



RSEIS documentation built on Aug. 19, 2023, 5:07 p.m.