5.10.1.18. eqcorrscan.utils.plotting.triple_plot¶
-
eqcorrscan.utils.plotting.
triple_plot
(cccsum, cccsum_hist, trace, threshold, save=False, savefile=None)[source]¶ Plot a day-long seismogram, correlogram and histogram.
Parameters: - cccsum (numpy.ndarray) Array of the cross-channel cross-correlation sum
- cccsum_hist (numpy.ndarray) cccsum for histogram plotting, can be the same as cccsum but included if cccsum is just an envelope.
- trace (obspy.core.trace.Trace) A sample trace from the same time as cccsum
- threshold (float) Detection threshold within cccsum
- save (bool) If True will save and not plot to screen, vice-versa if False
- savefile (str) Path to save figure to, only required if save=True
Returns: matplotlib.figure
Example
>>> from obspy import read >>> from eqcorrscan.core.match_filter import normxcorr2 >>> from eqcorrscan.utils.plotting import triple_plot >>> st = read() >>> template = st[0].copy.trim(st[0].stats.starttime + 8, ... st[0].stats.starttime + 12) >>> tr = st[0] >>> ccc = normxcorr2(template=template.data, image=tr.data) >>> tr.data = tr.data[0:len(ccc[0])] >>> triple_plot(cccsum=ccc, cccsum_hist=ccc, trace=tr, ... threshold=0.8)