mne-tools / mne-tools/mne-python

Add option to add vertical jitter to events plot

Open
#7,719 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ENH VIZ
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Describe the problem

When extracting the events from the first run of the ds000246 OpenNeuro datasat and plotting them via mne.viz.plot_events(), I was convinced that the number plotted button events didn't match the number of events in the legend. Closer inspection revealed that there was simply some hard-to-spot overplotting.

Screenshot 2020-05-04 at 14 49 03
Describe your solution

I therefore propose to add a jitter parameter to plot_events() which would add a vertical jitter to the event data points, reducing overplotting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the plot_events() entry point and inspect how event data points and the legend are currently plotted. Define how an optional vertical jitter should affect the event points without changing their event identities, then add coverage for the new behavior if the existing plotting tests provide a suitable place. Done means overplotted events can be visually separated when jitter is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.