plots.plot_mags_in_time#
- seismostats.plots.plot_mags_in_time(times: ndarray, magnitudes: ndarray, mc_change_times: list | None = None, mcs: list | None = None, ax: Axes | None = None, dot_smallest: int = 10, dot_largest: int = 200, dot_interpolation_power: int = 2, color_dots: str | ndarray = 'blue', cmap: str = 'viridis', color_line: str = '#eb4034') Axes#
Creates a scatter plot, each dot is an event. Time shown on the x-axis, magnitude shown on the y-axis, but also reflected in the size of dots.
Optionally, adds lines that represent the change in completeness magnitude. For example,
mc_change_times = [2000, 2005]andmcs = [3.5, 3.0]means that between 2000 and 2005, Mc is 3.5 and after 2005, Mc is 3.0.- Parameters:
times – Array containing times of events.
magnitudes – Array of magnitudes of events corresponding to the
times.ax – Axis where figure should be plotted.
mc_change_times – List of points in time when Mc changes, sorted in increasing order, can be given as a list of datetimes or integers (years).
mcs – Changed values of Mc at times given in
mc_change_times.dot_smallest – Smallest dot size for magnitude scaling.
dot_largest – Largest dot size for magnitude scaling.
dot_interpolation_power – Interpolation power for scaling.
color_dots – Color of the dots representing the events.
cmap – Colormap for the dots, in case color_dots is an array. Default is “viridis”.
color_line – Color of the line representing the Mc changes.
- Returns:
ax – ax that was plotted on