Plotting Spectrograms

The following lines of code demonstrate how to make a spectrogram plot of an ObsPy Stream object.

Lots of options can be customized, see spectrogram() for more details. For example, the colormap of the plot can easily be adjusted by importing a predefined colormap from, nice overviews of available matplotlib colormaps are given at:

import obspy

st ="")
st.spectrogram(log=True, title='BW.RJOB ' + str(st[0].stats.starttime))

(Source code, png)