pymovements.plot.tsplot

pymovements.plot.tsplot(arr: np.array, channel_names: list[str] | None = None, xlabel: str | None = None, rotate_ylabels: bool = True, share_y: bool = True, zero_centered_yaxis: bool = True, line_color: tuple[int, int, int] | str = 'k', line_width: int = 1, show_grid: bool = True, show_yticks: bool = True, figsize: tuple[int, int] = (15, 5), title: str | None = None, savepath: str | None = None, show: bool = True) None[source]

Plot time series with each channel getting a separate subplot.

Parameters
  • arr (np.ndarray) – array with channeled time series

  • channel_names (list, optional) – list of channel names

  • xlabel (str, optional) – set x label

  • rotate_ylabels (bool) – set to rotate ylabels

  • share_y (bool) – set if y-axes should share common axis

  • zero_centered_yaxis (bool) – set if y-axis should be zero centered

  • line_color (tuple, str) – set line color

  • line_width (int) – set line width

  • show_grid (bool) – set to show grid

  • show_yticks (bool) – set to show yticks

  • figsize (tuple) – Figure size.

  • title (str, optional) – Figure title.

  • savepath (str, optional) – If given, figure will be saved to this path.

  • show (bool) – If True, figure will be shown.

Raises

ValueError – If array has more than two dimensions.