5.10.1.14. eqcorrscan.utils.plotting.spec_trace¶
-
eqcorrscan.utils.plotting.
spec_trace
(traces, cmap=None, wlen=0.4, log=False, trc=u'k', tralpha=0.9, size=(10, 13), Fig=None, title=None, show=True)[source]¶ Wrapper for _spec_trace, plots data with spectrogram beneath.
Takes a stream or list of traces and plots the trace with the spectra beneath it - this just does the overseeing to work out if it needs to add subplots or not.
Parameters: - traces (list) Traces to be plotted, can be a single obspy.Stream, or a list of obspy.Trace
- cmap (str) [Matplotlib colormap](http://matplotlib.org/examples/color/ colormaps_reference.html)
- wlen (float) Window length for fft in seconds
- log (bool) Use a log frequency scale
- trc (str) Color for the trace.
- tralpha (float) Opacity level for the seismogram, from transparent (0.0) to opaque (1.0).
- size (tuple) Plot size, tuple of floats, inches
- axes Figure to plot onto, defaults to self generating.
- show (bool) To show plot or not, if false, will return Fig.
Returns: class: matplotlib.figure Example
>>> from obspy import read >>> from eqcorrscan.utils.plotting import spec_trace >>> st = read() >>> spec_trace(st, trc='white')
(Source code, png, hires.png)