Mne-python: Toggle Annotations visibility in plot_raw()

Created on 29 Nov 2020  ·  9Comments  ·  Source: mne-tools/mne-python

If working with heavily-annotated data, it can become very difficult to tell overlapping Annotations apart, and their descriptions may overlap too – see e.g. this example based on the sample data:

I'm now intending to add EOG, ECG, and artifact Annotations to this dataset, but I'm already struggling to keep track of what's going on 🧐 Of course I could shrink the displayed time span, but this may not always be a feasible approach.

I wondered if we could offer an option to toggle visibility for each annotation individually? When in Annotations mode, we already display a window with radio buttons to select which Annotation(s) to add / modify. Could we maybe simply add checkboxes – probably left of the radio buttons – to toggle visibility?

cc @drammock

ENH VIZ

Most helpful comment

Yes, although not all file formats support this.

All 9 comments

I suggested this at some point, but don't know if it was in a separate issue or just buried in some longer discussion. In any case, +💯 for this feature!

one idea is to have rather than the test a filled circle and a tooltip that
appears when you pass your mouse
over it. Not clear how easy this would be with matplotlib

>

I'd prefer an option to toggle individual annotations, but maybe another (additional) option could be to hide/minimize only the text.

A tooltip won't work well for overlapping annotations though...

Oh you meant, an area above the plot where we now have the text? Hm yes this could work

I still would prefer a toggle though

SigViewer shows a tooltip when hovering over annotations. The tooltip contains all present annotations with their corresponding colors, so this also works.
Screen Shot 2020-11-29 at 17 31 33

@cbrnr Wow, is that an annotation for an individual channel? 😍

Yes, although not all file formats support this.

A tooltip doesn't seem too bad from a picker standpoint I guess. But the overlap is still going to be a problem in that case.

A checkbox in the annotations window to disable at least the labeling, maybe also the annotation itself (maybe two check boxes then?) would be a good first step. @drammock up to you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

larsoner picture larsoner  ·  6Comments

jasmainak picture jasmainak  ·  3Comments

mirgee picture mirgee  ·  3Comments

annesodub picture annesodub  ·  3Comments

seankmartin picture seankmartin  ·  4Comments