pymovements.plotting.main_sequence_plot#
- pymovements.plotting.main_sequence_plot(event_df: EventDataFrame, marker_size: float = 25, color: str = 'purple', alpha: float = 0.5, marker: str = 'o', figsize: tuple[int, int] = (15, 5), title: str | None = None, savepath: str | None = None, show: bool = True, **kwargs: Collection) None #
Plot the saccade main sequence.
- Parameters:
event_df (EventDataFrame) – It must contain columns “peak_velocity” and “amplitude”.
marker_size (float) – Size of the marker symbol. (default: 25)
color (str) – Color of the marker symbol. (default: ‘purple’)
alpha (float) – Alpha value (=transparency) of the marker symbol. Between 0 and 1. (default: 0.5)
marker (str) – Marker symbol. Possible values defined by matplotlib.markers. (default: ‘o’)
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)
**kwargs (Collection) – Additional keyword arguments passed to matplotlib.pyplot.scatter.
- 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.