5.10.1.9. eqcorrscan.utils.plotting.obspy_3d_plot¶
-
eqcorrscan.utils.plotting.
obspy_3d_plot
(inventory, catalog, save=False, savefile=None, size=(10.5, 7.5))[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
- save (bool) False will plot to screen, true will save plot and not show to screen.
- savefile (str) Filename to save to, required for save=True
- size (tuple) Size of figure in inches.
Returns: class: matplotlib.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, png, hires.png)