5.2.10.7. eqcorrscan.utils.plotting.obspy_3d_plot

eqcorrscan.utils.plotting.obspy_3d_plot(inventory, catalog, **kwargs)[source]

Plot obspy Inventory and obspy Catalog classes in three dimensions.

Parameters:
  • inventory (obspy.core.inventory.inventory.Inventory) – Obspy inventory class containing station metadata

  • catalog (obspy.core.event.catalog.Catalog) – Obspy catalog class containing event metadata

  • title (str) – Title of figure

  • show (bool) – Whether to show the figure or not (defaults to True)

  • save (bool) – Whether to save the figure or not (defaults to False)

  • savefile (str) – Filename to save figure to, if save==True (defaults to “EQcorrscan_figure.png”)

  • return_figure (bool) – Whether to return the figure or not (defaults to True), if False then the figure will be cleared and closed.

  • size (tuple of float) – Figure size as (width, height) in inches. Defaults to (10.5, 7.5)

Returns:

matplotlib.figure.Figure

Example:

>>> from obspy.clients.fdsn import Client
>>> from obspy import UTCDateTime
>>> from eqcorrscan.utils.plotting import obspy_3d_plot
>>> client = Client('IRIS')
>>> t1 = UTCDateTime(2012, 3, 26)
>>> t2 = t1 + 86400
>>> catalog = client.get_events(starttime=t1, endtime=t2, latitude=-43,
...                             longitude=170, maxradius=5)
>>> inventory = client.get_stations(starttime=t1, endtime=t2, latitude=-43,
...                                 longitude=170, maxradius=10)
>>> obspy_3d_plot(inventory=inventory, catalog=catalog) 

(Source code)