matplotlib / matplotlib/matplotlib
[MNT]: in class cursor,when the mouse moves out of the ax, redrawing takes a long time
Open
Nobody has claimed this yet.
Maintenance
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Summary
https://github.com/matplotlib/matplotlib/blob/v3.10.1/lib/matplotlib/widgets.py#L1937
self.canvas.draw() takes a long time when mouse moves out
### Proposed fix
restore the background
self.canvas.restore_region(self.background)
self.canvas.blit(self.ax.bbox)
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 in lib/matplotlib/widgets.py at the cursor code around line 1937 and reproduce the slow redraw when the mouse leaves the axes. Evaluate the proposed background restore and blit behavior, then verify that cursor redraws complete promptly without changing the expected plot display.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization, performance
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100