pymovements.plotting.tsplot#
- pymovements.plotting.tsplot(gaze: GazeDataFrame, channels: list[str] | None = None, xlabel: str | None = None, n_cols: int | None = None, n_rows: int | 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 #
Plot time series with each channel getting a separate subplot.
- Parameters:
gaze (GazeDataFrame) – The GazeDataFrame to plot.
channels (list[str] | None) – List of channel names to plot. If None, all channels will be plotted. (default: None)
xlabel (str | None) – Set the x label. (default: None)
n_cols (int | None) – Number of channel subplot colunms. If None, it will be automatically inferred. (default: None)
n_rows (int | None) – Number of channel subplot rows. If None, it will be automatically inferred. (default: None)
rotate_ylabels (bool) – Set whether to rotate ylabels. (default: True)
share_y (bool) – Set if y-axes should share common axis. (default: True)
zero_centered_yaxis (bool) – Set if y-axis should be zero centered. (default: True)
line_color (tuple[int, int, int] | str) – Set line color. (default: ‘k’)
line_width (int) – Set line width. (default: 1)
show_grid (bool) – Set whether to show the background grid. (default: True)
show_yticks (bool) – Set whether to show yticks. (default: True)
figsize (tuple[int, int]) – Figure size. (default: (15, 5))
title (str | None) – Figure title. (default: None)
savepath (str | None) – If given, figure will be saved to this path. (default: None)
show (bool) – If True, figure will be shown. (default: True)
- Raises:
ValueError – If array has more than two dimensions.