Title: Rationalise artist get_figure methods; make figure attribute a property by rcomer · Pull Request #28177 · matplotlib/matplotlib · GitHub
Open Graph Title: Rationalise artist get_figure methods; make figure attribute a property by rcomer · Pull Request #28177 · matplotlib/matplotlib
X Title: Rationalise artist get_figure methods; make figure attribute a property by rcomer · Pull Request #28177 · matplotlib/matplotlib
Description: PR summary Closes #28170. Introduce the root parameter to get_figure and make the behaviour consistent between SubFigure and other artists. Turn the figure attribute into a property so that users cannot set the figure without going through the checks of the set_figure method. Not included here is my attempt to find/replace all internal use of the figure attribute with _figure, which would obviously be necessary if we want to deprecate the figure property. I gave up when I realised we have other objects that have the attribute but are not artists (GridSpec, FigureCanvasBase, maybe others) which will make it more complicated to find what does and doesn't need to change. I have my progress so far saved in a commit in case we do decide we want to do that. Is there any performance consideration for making the internal use go through the get and set methods? PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested [n/a] Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: PR summary Closes #28170. Introduce the root parameter to get_figure and make the behaviour consistent between SubFigure and other artists. Turn the figure attribute into a property so that users...
X Description: PR summary Closes #28170. Introduce the root parameter to get_figure and make the behaviour consistent between SubFigure and other artists. Turn the figure attribute into a property so that users...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/28177
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e880bf5c-e410-9a60-8f72-43d008ffa9a3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DC70:1261E5:B59769:F2A5D4:6A556CC3 |
| html-safe-nonce | a837b00fa9dd0ccbb128c7f79409ce5e5782f8a3ce3dfb0c5ab7e3cb8abb75f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzcwOjEyNjFFNTpCNTk3Njk6RjJBNUQ0OjZBNTU2Q0MzIiwidmlzaXRvcl9pZCI6IjIzMTQzMjE4MjE5MDA4Mjc4NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b4fbb6a2b5d3c13a6af8edf67cb55c75c730c64b4f293c995a01877e244229d9 |
| hovercard-subject-tag | pull_request:1856539705 |
| 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/28177/files |
| twitter:image | https://avatars.githubusercontent.com/u/10599679?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10599679?s=400&v=4 |
| og:image:alt | PR summary Closes #28170. Introduce the root parameter to get_figure and make the behaviour consistent between SubFigure and other artists. Turn the figure attribute into a property so that users... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | a90bd2a4a25feb75544d06b89350dcf95d9c46e0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width