mne-tools / mne-tools/mne-python
Add legend to `plot_psd`, when using picks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the problem
When doing raw.plot_psd(picks=...), with multiple axes, and then running plt.legend(), the different colors do not show up sufficiently on the legend.
Describe your solution
Add labels to each plot on plot_psd, so ax.legend() will catch these.
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation of raw.plot_psd and inspect how plots are created when picks contains multiple axes. Check how ax.legend() receives labels, then verify that each plotted selection is represented distinctly in the legend and that existing plot_psd behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100