Title: artist.axes and .figure should never be reassignable · Issue #6793 · matplotlib/matplotlib · GitHub
Open Graph Title: artist.axes and .figure should never be reassignable · Issue #6793 · matplotlib/matplotlib
X Title: artist.axes and .figure should never be reassignable · Issue #6793 · matplotlib/matplotlib
Description: #3835 ensured that the .axes attribute of an artist cannot be assigned to a new Axes when it is already set to an earlier Axes. However, it does not prevent one from doing so by going via None. Also, nothing is done regarding reassignmen...
Open Graph Description: #3835 ensured that the .axes attribute of an artist cannot be assigned to a new Axes when it is already set to an earlier Axes. However, it does not prevent one from doing so by going via None. Als...
X Description: #3835 ensured that the .axes attribute of an artist cannot be assigned to a new Axes when it is already set to an earlier Axes. However, it does not prevent one from doing so by going via None. Als...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6793
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"artist.axes and .figure should never be reassignable","articleBody":"#3835 ensured that the `.axes` attribute of an artist cannot be assigned to a new Axes when it is already set to an earlier Axes. However, it does not prevent one from doing so by going via None. Also, nothing is done regarding reassignment of `.figure`.\n\nIn practice there's plenty of code that assumes these invariants (see #6785 for how I ended up here), so I'd suggest tightening the restrictions to\n- `.axes` can only ever be set to a non-None value once. Upon removal of the artist from an axes, the private attribute `._discarded` is set to prevent further reuse. (If there is truly need for it, we could add a `.copy()` method that would return, well, a copy of the artist, but with `._discarded` unset, so that it can be reassigned to a new Axes.)\n- `.figure` follows the same rules, and is additionally automatically set/unset whenever `.axes` is set/unset.\n\nThoughts?\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2016-07-18T18:38:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/6793/matplotlib/issues/6793"}
| 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:bb903f4b-d4b8-b18f-0250-5d15a9ebd1e3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D350:290D1F:25BE4A1:33AD517:6A53AD27 |
| html-safe-nonce | 5de9915b7f87b98ed90a346df10792aa508a87a56229a65dc1218f15be00a230 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzUwOjI5MEQxRjoyNUJFNEExOjMzQUQ1MTc6NkE1M0FEMjciLCJ2aXNpdG9yX2lkIjoiMzgyOTc5OTkzNzA3NzY1Mjc3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 63200760979fa4266b7675393337ba386f8571519673fe0641fffdb833c00771 |
| hovercard-subject-tag | issue:166162571 |
| 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/6793/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d8d06f5e99c625c10a988c51d8e0a54c640c97a7530bc30aadf2f3ca5e57bc9/matplotlib/matplotlib/issues/6793 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d8d06f5e99c625c10a988c51d8e0a54c640c97a7530bc30aadf2f3ca5e57bc9/matplotlib/matplotlib/issues/6793 |
| og:image:alt | #3835 ensured that the .axes attribute of an artist cannot be assigned to a new Axes when it is already set to an earlier Axes. However, it does not prevent one from doing so by going via None. Als... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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