Title: Closing figures is done by number · Issue #15203 · matplotlib/matplotlib · GitHub
Open Graph Title: Closing figures is done by number · Issue #15203 · matplotlib/matplotlib
X Title: Closing figures is done by number · Issue #15203 · matplotlib/matplotlib
Description: Closing figures is done by number Currently, closing a figure is done using the num attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could be the same as a pyplot-managed figure....
Open Graph Description: Closing figures is done by number Currently, closing a figure is done using the num attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could...
X Description: Closing figures is done by number Currently, closing a figure is done using the num attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15203
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Closing figures is done by number","articleBody":"### Closing figures is done by number\r\n\r\n**Currently, closing a figure is done using the `num` attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could be the same as a\r\npyplot-managed figure.**\r\n\r\nAs there are efforts to reduce the dependency on pyplot, such as #14024, this should be changed for those to work well. Alternatively, a way to create a manager which selects an appropiate number could work.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt \r\n\r\n# Figure managed by pyplot \r\nfig1 = plt.figure() \r\n \r\n# Figure not managed by pyplot, but using the same backend \r\nfig2 = fig = plt.new_figure_manager(1).canvas.figure \r\n\r\nfig1.show() \r\nfig2.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nClosing one figure closes both.\r\n\r\n**Expected outcome**\r\n\r\nClosing one figure leaves the other open.\r\n\r\n**Matplotlib version**\r\n * Operating system: All\r\n * Matplotlib version: 3.0.3\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg\r\n * Python version: All\r\n\r\n","author":{"url":"https://github.com/vnmabus","@type":"Person","name":"vnmabus"},"datePublished":"2019-09-06T14:06:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/15203/matplotlib/issues/15203"}
| 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:8133f7fe-0b17-7638-e930-85959ffa370f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8D2:BFAF3:67CA39:8C4D69:6A51D3D0 |
| html-safe-nonce | ff66ee07f7e4aa92c943169e8245239e2e2b475783382c64bbb8d42d126c5534 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEQyOkJGQUYzOjY3Q0EzOTo4QzRENjk6NkE1MUQzRDAiLCJ2aXNpdG9yX2lkIjoiNzU5MTgzMDI1NzcxNzU5NzEzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ec71d4a93f4639631ea1b30001d006b4af43e29ce27f7dd59a6764c01611ce1d |
| hovercard-subject-tag | issue:490347173 |
| 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/15203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6052ec0b9cdad9b2375e28e7fa1f5a6a73362ac23215d3731b2089dc017863dc/matplotlib/matplotlib/issues/15203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6052ec0b9cdad9b2375e28e7fa1f5a6a73362ac23215d3731b2089dc017863dc/matplotlib/matplotlib/issues/15203 |
| og:image:alt | Closing figures is done by number Currently, closing a figure is done using the num attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vnmabus |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width