matplotlib / matplotlib/matplotlib
[ENH]: should Axes hold references to widgets?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Problem
People often forget to hold a reference to a widget so that it‘s getting garbage collected, c.f. #24372.
### Proposed solution
Track widgets in a (maybe private) Axes attribute, as we do for artists.
The widget‘s artists (=visual part of the widget) are referenced, so there is a tight relationship. We should add the widget objects themselves (=logic part of the widget) as well.
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 reading how Axes retains artist references and how widgets are associated with their artists. Trace the widget-related entry points and confirm that the resulting Axes state keeps widget objects alive, then add or update focused tests for garbage-collection behavior.
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
- 45/100