plot_motion#
- PySeismoSoil.helper_site_response.plot_motion(accel: str | np.ndarray, unit: str = 'm', fig: Figure | None = None, ax: Axes | None = None, title: str | None = None, figsize: tuple[float, float] = (5, 6), dpi: float = 100) tuple[Figure, tuple[Axes, Axes, Axes]][source]#
Plot acceleration, velocity, and displacement time history from a file name of acceleration data.
- Parameters:
accel (str | np.ndarray) – Acceleration time history. Can be a file name, or a 2D numpy array with two columns (time and accel).
unit (str, default='m') – Unit of acceleration for displaying on the y axis label
fig (Figure | None, default=None) – Figure object. If None, a new figure will be created.
ax (Axes | None, default=None) – Axes object. If None, a new axes will be created.
title (str | None, default=None) – Title of the figure (optional).
figsize (tuple[float, float], default=(5, 6)) – Figure size in inches, as a tuple of two numbers. The figure size of
fig(if notNone) will override this parameter.dpi (float, default=100) – Figure resolution. The dpi of
fig(if notNone) will override this parameter.
- Returns:
fig (Figure) – The figure object being created or being passed into this function.
(ax1, ax2, ax3) (tuple[Axes, Axes, Axes]) – The axes objects of the three subplots.
- Raises:
TypeError – When the types of input parameters are incorrect
ValueError – When unit is not “m” or “cm”