pymovements.plotting.main_sequence_plot#

pymovements.plotting.main_sequence_plot(event_df: EventDataFrame, figsize: tuple[int, int] = (15, 5), title: str | None = None, savepath: str | None = None, show: bool = True) None[source]#

Plots the saccade main sequence.

Parameters:
  • event_df – Event dataframe. It must contain columns “peak_velocity” and “amplitude”.

  • 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:
  • KeyError – If the input dataframe has no ‘amplitude’ and/or ‘peak_velocity’ column. Those are needed to create the plot.

  • ValueError – If the event dataframe does not contain any saccades.