pyntbci.plotting.stimplot

pyntbci.plotting.stimplot(S: ndarray[tuple[int, ...], dtype[_ScalarType_co]], fs: int, ax: Axes = None, upsample: int = 20, plotfs: bool = True, labels: list[str] = None) None[source]

Plot the stimulus time-series.

Parameters:
  • S (NDArray) – The stimulus time-series of shape (n_stimuli, n_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

  • labels (list[str] (default: None)) – A list of string labels for each of the stimuli, used as y ticks in the stimulus plot. If None, stimulus labels of 1 to the number of stimuli is used.