mtuq.graphics._plot_attrs

mtuq.graphics._plot_attrs(dirname, stations, origin, attrs, key, components=['Z', 'R', 'T'], format='png', backend=None, **kwargs)[source]

Reads the attribute given by key from the attrs data structure, and plots how this attribute varies

Within the specified directory, a separate figure will be created for each component, e.g. Z.png, R.png, T.png.

Keyword arguments

components (list): Generate figures for the given components

format (str): Image file format (defaults to png)

backend (function): Backend function

Backend function

To customize figure appearance, users can pass their own backend function. See online documentation for details. Otherwise, defaults to a generic matplotlib backend.

Standard pygmt backend

The standard pygmt backend is used to plot station attributes over a hillshaded map. Default calls to front_end functions can be supplemented with optional keyword arguments to customize the appearance of the plot.

from mtuq.graphics.attrs import _pygmt_backend
plot_time_shifts('./SW/tshift', attributes_sw, stations, origin,
                moment_tensor=best_mt, process=process_sw, backend=_pygmt_backend)