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[source]#
Plots the saccade main sequence.
- Parameters:
event_df (Event dataframe) – It must contain columns “peak_velocity” and “amplitude”.
marker_size (float) – Size of the marker symbol.
color (str) – Color of the marker symbol.
alpha (float) – Alpha value (=transparency) of the marker symbol. Between 0 and 1.
marker (str) – Marker symbol. Possible values defined by matplotlib.markers.
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.
**kwargs – 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.