plot_motion#
- PySeismoSoil.helper_site_response.plot_motion(accel: str | numpy.ndarray, unit: str = 'm', fig: matplotlib.figure.Figure | None = None, ax: matplotlib.axes._axes.Axes | None = None, title: str | None = None, figsize: tuple[float, float] = (5, 6), dpi: float = 100) tuple[matplotlib.figure.Figure, tuple[matplotlib.axes._axes.Axes, matplotlib.axes._axes.Axes, matplotlib.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) – Unit of acceleration for displaying on the y axis label
fig (Figure | None) – Figure object. If None, a new figure will be created.
ax (Axes | None) – Axes object. If None, a new axes will be created.
title (str | None) – Title of the figure (optional).
figsize (tuple[float, float]) – Figure size in inches, as a tuple of two numbers. The figure size of
fig
(if notNone
) will override this parameter.dpi (float) – 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”