This documentation is for development version 0.18.dev0.


mne.viz.plot_events(events, sfreq=None, first_samp=0, color=None, event_id=None, axes=None, equal_spacing=True, show=True)[source]

Plot events to get a visual display of the paradigm.

events : array, shape (n_events, 3)

The events.

sfreq : float | None

The sample frequency. If None, data will be displayed in samples (not seconds).

first_samp : int

The index of the first sample. Typically the raw.first_samp attribute. It is needed for recordings on a Neuromag system as the events are defined relative to the system start and not to the beginning of the recording.

color : dict | None

Dictionary of event_id value and its associated color. If None, colors are automatically drawn from a default list (cycled through if number of events longer than list of default colors).

event_id : dict | None

Dictionary of event label (e.g. ‘aud_l’) and its associated event_id value. Label used to plot a legend. If None, no legend is drawn.

axes : instance of Axes

The subplot handle.

equal_spacing : bool

Use equal spacing between events in y-axis.

show : bool

Show figure if True.

fig : matplotlib.figure.Figure

The figure object containing the plot.


New in version 0.9.0.