Title: Restore axes sharedness when unpickling. by anntzer · Pull Request #10659 · matplotlib/matplotlib · GitHub
Open Graph Title: Restore axes sharedness when unpickling. by anntzer · Pull Request #10659 · matplotlib/matplotlib
X Title: Restore axes sharedness when unpickling. by anntzer · Pull Request #10659 · matplotlib/matplotlib
Description: Previously, pickling and unpickling shared axes would result in axes sharing a ticker instance (because that's how shared axes are set up), but without changes of one's xlims propagated to the other. The reason is that that sharedness information is stored in AxesBase._shared_x_axes, which does not get pickled together with the Axes instance: the latter only has a textual reference "I am an instance of AxesBase", so the Grouper information is lost. To keep the Grouper information valid, instead move the Groupers to the instance dictionaries (as references to global groupers). Also make Groupers picklable following a similar strategy as Transforms, i.e. by transforming weakrefs into real refs when pickling and transforming them back into weakref when unpickling. PR Summary PR Checklist Has Pytest style unit tests Code is PEP 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: Previously, pickling and unpickling shared axes would result in axes sharing a ticker instance (because that's how shared axes are set up), but without changes of one's xlims propagated to ...
X Description: Previously, pickling and unpickling shared axes would result in axes sharing a ticker instance (because that's how shared axes are set up), but without changes of one's xlims propag...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/10659
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:eba7138b-3cb5-0908-a65a-e72415bb4c52 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CCB6:2BB762:2C68DFD:3E3949F:6A54BAF7 |
| html-safe-nonce | e269910b0fd5ebe427cf42ad1887f31ec729b402dbf0bcac61511020f618fa89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0I2OjJCQjc2MjoyQzY4REZEOjNFMzk0OUY6NkE1NEJBRjciLCJ2aXNpdG9yX2lkIjoiNTE2MjE1MjUwMDg2Mjk1ODMyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 341f4ef77ac5484c48e98a23eeb002256068086fe22473777c80595d150695e5 |
| hovercard-subject-tag | pull_request:172657486 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/10659/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | Previously, pickling and unpickling shared axes would result in axes sharing a ticker instance (because that's how shared axes are set up), but without changes of one's xlims propagated to ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 69f9664dd5e7a82ba8ab1b4cb7f5a2f09333ab38 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width