matplotlib / matplotlib/mpl-gui

Differences with show() between backends

Open
#1 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I was just testing out the examples from the docs and figured I would put some quick findings here while running on a Mac.

* Documentation: Change `subplot_module` to `subplot_mosaic` in a couple of places in the code samples
* `qt5agg`: mg.show() does not exit after closing both figures, the event loop keeps running
* `macosx`: mg.show() closing one figure closes all of the figures, as if the closeWindow gets sent to every figure, not just the one clicked.
* `tkagg`: In the second `fr.show()` call in the examples I get this error: `_tkinter.TclError: can't invoke "wm" command: application has been destroyed` (macosx seems to get through this and the qt5agg I don't think ever even gets here due to the event loop not quiting after the first show() as mentioned above)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented examples on macOS with the qt5agg, macosx, and tkagg backends, focusing on each reported show() and figure-closing behavior. Review the examples containing subplot_module and the backend-specific show/close entry points mentioned in the report. Done means the samples use subplot_mosaic and each backend handles the reported event-loop, window-closing, and second-show cases without the stated errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.