Title: New configure_subplots behaves badly on TkAgg backend · Issue #18299 · matplotlib/matplotlib · GitHub
Open Graph Title: New configure_subplots behaves badly on TkAgg backend · Issue #18299 · matplotlib/matplotlib
X Title: New configure_subplots behaves badly on TkAgg backend · Issue #18299 · matplotlib/matplotlib
Description: Bug report Bug summary After #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to understand: the button response calls Gcf.destro...
Open Graph Description: Bug report Bug summary After #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to understa...
X Description: Bug report Bug summary After #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to unde...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18299
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New configure_subplots behaves badly on TkAgg backend","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nAfter #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to understand: the button response calls `Gcf.destroy` but the figure is intentionally not registered, so the `FigureManagerTk.destory` is never called. I suspect (but have not confirmed) that the slider events are being lost due to the new figure manager making a new `tkinter.Tk` instance [here](https://github.com/anntzer/matplotlib/blob/c55ca9fd64f74c4bb9ad57ea371ae8a1ec07b7d0/lib/matplotlib/backends/_backend_tk.py#L849). [EDIT: NOPE, see comment]\r\n\r\nCC @anntzer \r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\n\r\nmatplotlib.use(\"TkAgg\")\r\nplt.plot([1,2,3],[1,2,5])\r\n# if not interactive\r\nplt.show()\r\n# click Configure Subplots\r\n```\r\n\r\n**Actual outcome**\r\n\r\ninteractive Tk window but sliders don't work and close window button is not responsive\r\n\r\n**Expected outcome**\r\n\r\nprevious behavior\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Win10\r\n * Matplotlib version: master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): TkAgg\r\n * Python version: 3.8.5\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/richardsheridan","@type":"Person","name":"richardsheridan"},"datePublished":"2020-08-19T13:40:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/18299/matplotlib/issues/18299"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4c14db1e-2b25-5f6a-903c-cdb7b0279b61 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A188:27E2F7:599CB2:775BA2:6A52FBB5 |
| html-safe-nonce | 8ecc9e6c0c75be1a631020885a35e1cc9c3f2687230e07bee6ddfc92127a577c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTg4OjI3RTJGNzo1OTlDQjI6Nzc1QkEyOjZBNTJGQkI1IiwidmlzaXRvcl9pZCI6Ijg1MTAyNDg0MDMzODg3OTE3MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | eb7a40320cabe9ae47f348e142ad63606b68a3ae55d1aa91249d95ef044a1a34 |
| hovercard-subject-tag | issue:681849696 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/18299/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4f9d06a8e592fe33fba46d6556cc61b9e97235ac141ea47352f19f1d23378f7e/matplotlib/matplotlib/issues/18299 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4f9d06a8e592fe33fba46d6556cc61b9e97235ac141ea47352f19f1d23378f7e/matplotlib/matplotlib/issues/18299 |
| og:image:alt | Bug report Bug summary After #16818, with the TkAgg backend, configure subplots window can't be closed and the sliders do not respond to input. The window close issue is straightforward to understa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | richardsheridan |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width