pyntbci.plotting.eventplot

pyntbci.plotting.eventplot(S: ndarray[Any, dtype[_ScalarType_co]], E: ndarray[Any, dtype[_ScalarType_co]], fs: int, ax: Axes | None = None, upsample: int = 20, plotfs: bool = True, events: tuple[str] | None = None) None[source]

Plot the event time-series. Specifically, shows a figure with the original stimulus and the decomposed events across time.

Parameters:
  • S (NDArray) – The stimulus time-series of shape (samples)

  • E (NDArray) – The event time-series of shape (events, samples)

  • fs (int) – The sampling rate in Hz

  • ax (Axes (default: None)) – The axis to plot in. If None, a new figure will be opened.

  • upsample (int (default: 20)) – A scalar value to upsample the stimulus and event time-series with for improved visualization

  • plotfs (bool (default: True)) – Whether to plot vertical gridlines at the original sampling rate fs

  • events (tuple (default: None)) – A tuple with the names of each of the events