Plot events to get a visual display of the paradigm.
array of int, shape (n_events, 3)The array of events. The first column contains the event time in samples, with first_samp included. The third column contains the event id.
float | NoneThe sample frequency. If None, data will be displayed in samples (not seconds).
intThe index of the first sample. Recordings made on Neuromag systems
number samples relative to the system start (not relative to the
beginning of the recording). In such cases the raw.first_samp
attribute can be passed here. Default is 0.
dict | NoneDictionary of event_id integers as keys and colors as values. If None, colors are automatically drawn from a default list (cycled through if number of events longer than list of default colors). Color can be any valid matplotlib color.
dict | NoneDictionary of event labels (e.g. ‘aud_l’) as keys and their associated event_id values. Labels are used to plot a legend. If None, no legend is drawn.
AxesThe subplot handle.
Use equal spacing between events in y-axis.
Show figure if True.
Can be 'raise' (default) to raise an error, 'warn' to emit a
warning, or 'ignore' to ignore when event numbers from event_id are missing from
events. When numbers from events are missing from
event_id they will be ignored and a warning emitted; consider
using verbose='error' in this case.
New in version 0.21.
str | int | NoneControl verbosity of the logging output. If None, use the default
verbosity level. See the logging documentation and
mne.verbose() for details. Should only be passed as a keyword
argument.
matplotlib.figure.FigureThe figure object containing the plot.
Notes
New in version 0.9.0.
mne.viz.plot_events#Preprocessing functional near-infrared spectroscopy (fNIRS) data
Sleep stage classification from polysomnography (PSG) data
Single trial linear regression analysis with the LIMO dataset