Skip to content

Commit

Permalink
enh: better event id overview
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Sep 16, 2024
1 parent f8f6e92 commit b499f7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/changes/devel/12844.other.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Improve automatic figure scaling of :func:`mne.viz.plot_events` when a high amount of unique events is supplied, by `Stefan Appelhoff`_.
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`_.
4 changes: 2 additions & 2 deletions mne/viz/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,9 @@ def plot_events(
continue
y = np.full(count, idx + 1 if equal_spacing else events[ev_mask, 2][0])
if event_id is not None:
event_label = f"{event_id_rev[ev]} ({count})"
event_label = f"{event_id_rev[ev]} (id={ev}; N={count})"
else:
event_label = f"N={count:d}"
event_label = f"id={ev}; N={count:d}"
labels.append(event_label)
kwargs = {}
if ev in color:
Expand Down

0 comments on commit b499f7b

Please sign in to comment.