Learn R Programming

RSEIS (version 2.8-1)

PLOT.SEISN: Plot Seismic Section

Description

Seismic traces are plotted on a panel horizontally.

Usage

PLOT.SEISN(GH, tim = 1, dt = 1, sel =c(1:4) , WIN =c(1,0) , labs
=c("CE1") , notes = "CE1.V", subnotes=NA, tags ="CE1.V" , sfact = 1, LOG = "", COL = 'red', add = 1, pts = FALSE, YAX = 1, TIT = NULL, SHIFT = NULL, rm.mean = TRUE, UNITS = "volts", MARK = TRUE)

Arguments

GH
RSEIS data structure
tim
tim axis vector, seconds
dt
deltaT, sample rate
sel
select which traces from GH
WIN
initial time window for plot
labs
character string vector, labels for units on y-axes, depends on YAX
notes
character string vector, labels on upper right of each panel
subnotes
character string vector, labels on lower-right of each panel
tags
character string vector, labels next to right end of trace (usually numbers)
sfact
scaling flag, 1=scale individually(DEFAULT), 2 = scale by window
LOG
log for x-axis
COL
color vector for plotting traces
add
integer: add to plot=1,2,3, add=1 plot and add traces, add =2 plot, but no traces, add = 3 no plot, but add traces
pts
add points
YAX
type of Yaxis label, 1,2,3 DEFAULT=1 only one y-axis others scaled; 2=all y-axes are plotted on left; 3=all y-axes plotted, alternating left and right
TIT
title
SHIFT
vector, shift each trace along x-axis by associated moveout time
rm.mean
remove mean from traces
UNITS
character, units of traces (see labs)
MARK
character marking for earthquake

Value

  • Graphical Side effect. list(n=nn, dy=dy, minS=minS, maxS=maxS, meanS=meanS, DX=range(tim[tflag]) )

Details

panel of N traces are plotted. For YAX, default is YAX=1, plot an axis with no units label and scale all the traces to

See Also

swig

Examples

Run this code
data("GH")
m = match( GH$STNS,    GH$stafile$name)
LATS = GH$stafile$lat[m]
LONS = GH$stafile$lon[m]
dees = distaz( GH$pickfile$LOC$lat, GH$pickfile$LOC$lon, LATS, LONS)

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


###   set up good colors
pcols = seiscols(GH)

### select only vertical components

PLOT.SEISN(GH, sel=sel)

GH$units = rep("m/s", times=length(GH$KNOTES))
GH$pcols = pcols


######  simple plot of GH structure
YN = PLOT.SEISN(GH, WIN=c(5,12))

######  a color must be provided for all traces.
######  simple plot of GH structure, with selection and colors

YN = PLOT.SEISN(GH, WIN=c(5,12), sel=sel, COL=rainbow(length(sel)) )


####   alternating Y axes
 YN = PLOT.SEISN(GH, WIN=c(5,12) ,  dt=GH$dt[sel], sel=sel, sfact=1 ,
notes=GH$KNOTES[sel], YAX =3, UNITS = TRUE ,labs = GH$units[sel],
COL=pcols    , TIT="test")


#### Y  axes on same side
 YN = PLOT.SEISN(GH, WIN=c(5,12) ,  dt=GH$dt[sel], sel=sel, sfact=1 ,
notes=GH$KNOTES[sel], YAX =2, UNITS = TRUE ,labs = GH$units[sel],
COL=pcols    , TIT="test")

Run the code above in your browser using DataLab