5.2.10.5. eqcorrscan.utils.plotting.interev_mag¶
- eqcorrscan.utils.plotting.interev_mag(times, mags, **kwargs)[source]¶
Plot inter-event times against magnitude.
- Parameters:
times (list) – list of the detection times, must be sorted the same as mags
mags (list) – list of magnitudes
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:
Example
>>> from obspy.clients.fdsn import Client >>> from obspy import UTCDateTime >>> from eqcorrscan.utils.plotting import interev_mag >>> client = Client('IRIS') >>> t1 = UTCDateTime('2012-03-26T00:00:00') >>> t2 = t1 + (3 * 86400) >>> catalog = client.get_events(starttime=t1, endtime=t2, minmagnitude=3) >>> magnitudes = [event.preferred_magnitude().mag for event in catalog] >>> times = [event.preferred_origin().time for event in catalog] >>> interev_mag(times, magnitudes)