Skip to content

Commit b499f7b

Browse files
committed
enh: better event id overview
1 parent f8f6e92 commit b499f7b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/changes/devel/12844.other.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Improve automatic figure scaling of :func:`mne.viz.plot_events` when a high amount of unique events is supplied, by `Stefan Appelhoff`_.
1+
Improve automatic figure scaling of :func:`mne.viz.plot_events`, and event_id and count overview legend when a high amount of unique events is supplied, by `Stefan Appelhoff`_.

mne/viz/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,9 @@ def plot_events(
867867
continue
868868
y = np.full(count, idx + 1 if equal_spacing else events[ev_mask, 2][0])
869869
if event_id is not None:
870-
event_label = f"{event_id_rev[ev]} ({count})"
870+
event_label = f"{event_id_rev[ev]} (id={ev}; N={count})"
871871
else:
872-
event_label = f"N={count:d}"
872+
event_label = f"id={ev}; N={count:d}"
873873
labels.append(event_label)
874874
kwargs = {}
875875
if ev in color:

0 commit comments

Comments
 (0)