Title: Inherit OffsetBox.get_window_extent. by anntzer · Pull Request #23907 · matplotlib/matplotlib · GitHub
Open Graph Title: Inherit OffsetBox.get_window_extent. by anntzer · Pull Request #23907 · matplotlib/matplotlib
X Title: Inherit OffsetBox.get_window_extent. by anntzer · Pull Request #23907 · matplotlib/matplotlib
Description: Adjust OffsetBox.get_window_extent to use get_extent (which is typically redefined in subclasses) instead of get_extent_offsets (which is not), and make it check whether the current class' get_offset takes any arguments or not (which is not consistent, but fixing that requires some backcompat work). Also set the offset-getter of AnchoredOffsetbox as a fixed method on the class, rather than dynamicaly setting in that class' get_extent_offset. These changes then let us inherit the implementation of OffsetBox.get_window_extent across most subclasses instead of having to copy-paste it again and again. This mostly replaces #21699 without touching the more complex question of changing/harmonizing the signature of get_offset. PR Summary PR Checklist Tests and Styling Has pytest style unit tests (and pytest passes). Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all). Documentation New features are documented, with examples if plot related. New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there). API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there). Documentation is sphinx and numpydoc compliant (the docs should build without error).
Open Graph Description: Adjust OffsetBox.get_window_extent to use get_extent (which is typically redefined in subclasses) instead of get_extent_offsets (which is not), and make it check whether the current class' get_...
X Description: Adjust OffsetBox.get_window_extent to use get_extent (which is typically redefined in subclasses) instead of get_extent_offsets (which is not), and make it check whether the current class' ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/23907
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3985e6dc-1252-447c-c254-3a058164b25f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA8E:1E565C:B080B4:EC377F:6A529C3D |
| html-safe-nonce | 96bdf5792d2fd8b360a4bcfe84effa5cabed58cce198a7ad7a9168c9eac5cdf8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQThFOjFFNTY1QzpCMDgwQjQ6RUMzNzdGOjZBNTI5QzNEIiwidmlzaXRvcl9pZCI6IjgwNjExNjA4MjkwMDgxMjQ5ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c8c8fb1300d3d371118067004bd056fa5f6db74cb110886a8e5af515b97f53e3 |
| hovercard-subject-tag | pull_request:1058457256 |
| 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/23907/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 | Adjust OffsetBox.get_window_extent to use get_extent (which is typically redefined in subclasses) instead of get_extent_offsets (which is not), and make it check whether the current class' get_... |
| 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 |
| disable-turbo | true |
| 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