Skip to content

Commit

Permalink
add a nice dayplot example with events to tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Apr 4, 2013
1 parent 1226478 commit 4d9a492
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Expand Up @@ -94,6 +94,18 @@ setting the ``type`` parameter to ``'dayplot'``:

.. plot:: source/tutorial/code_snippets/waveform_plotting_tutorial_4.py

Event information can be included in the plot as well (experimental feature, syntax might change):

>>> from obspy import read
>>> st = read("/tmp/GR.BFO..LHZ.2012.108")
>>> st.filter("lowpass", freq=0.1, corners=2)
>>> st.plot(type="dayplot", interval=60, right_vertical_labels=False,
... vertical_scaling_range=5e3, one_tick_per_line=True,
... color=['k', 'r', 'b', 'g'], show_y_UTC_label=False,
... events={'min_magnitude': 6.5})

.. plot:: source/tutorial/code_snippets/waveform_plotting_tutorial_5.py

--------------------
Plot & Color Options
--------------------
Expand Down
@@ -0,0 +1,7 @@
from obspy import read
st = read("http://examples.obspy.org/GR.BFO..LHZ.2012.108")
st.filter("lowpass", freq=0.1, corners=2)
st.plot(type="dayplot", interval=60, right_vertical_labels=False,
vertical_scaling_range=5e3, one_tick_per_line=True,
color=['k', 'r', 'b', 'g'], show_y_UTC_label=False,
events={'min_magnitude': 6.5})

0 comments on commit 4d9a492

Please sign in to comment.