Title: FIX: include axis labels in get_tightbbox when not for_layout_only by rcomer · Pull Request #31932 · matplotlib/matplotlib · GitHub
Open Graph Title: FIX: include axis labels in get_tightbbox when not for_layout_only by rcomer · Pull Request #31932 · matplotlib/matplotlib
X Title: FIX: include axis labels in get_tightbbox when not for_layout_only by rcomer · Pull Request #31932 · matplotlib/matplotlib
Description: PR summary Fixes #28117 and fixes #31568 This is the rebased branch from #31571, with some modifications for the 3D case and an added fix for the standard axes case. Since 5c75807 we have not been passing for_layout_only=False from the axes get_tightbbox down to the axis get_tightbbox. This PR makes sure that we do by explicitly calling axis.get_tightbbox() for that case, without the keyword in case we have hold of a third party axis that does not support it. An alternative solution is to modify the _get_tightbbox_for_layout_only helper function, which I tried at #28117 (comment). I'd be happy to switch to that - I don't have an opinion on which is better. The code from #31568 now gives The code from #28117 (comment) now gives Note there is also #31573, but I prefer the solution from #31571 because it leaves the responsibility for the axis labels with the relevant axis. AI Disclosure No AI used by me. 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 [n/a] New Features and API Changes are noted with a directive and release note [n/a] Documentation complies with general and docstring guidelines
Open Graph Description: PR summary Fixes #28117 and fixes #31568 This is the rebased branch from #31571, with some modifications for the 3D case and an added fix for the standard axes case. Since 5c75807 we have not bee...
X Description: PR summary Fixes #28117 and fixes #31568 This is the rebased branch from #31571, with some modifications for the 3D case and an added fix for the standard axes case. Since 5c75807 we have not bee...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31932
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0867c00d-3d82-0ddc-08b3-a107fe941e32 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D608:E6EAB:CA7D2B:1119C27:6A556024 |
| html-safe-nonce | 5f432c00b5c50c8d0c03618a3c29d1e09fa33f88c37415d7e28376da39cb5ac4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjA4OkU2RUFCOkNBN0QyQjoxMTE5QzI3OjZBNTU2MDI0IiwidmlzaXRvcl9pZCI6IjI3Nzg5NDM5NDkzOTM3MTUyMzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 28b3f8192022b3d20732c9016ebe9e2b5f817ac12f63270e4d848ef036abcf97 |
| hovercard-subject-tag | pull_request:3905048957 |
| 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/31932/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 Fixes #28117 and fixes #31568 This is the rebased branch from #31571, with some modifications for the 3D case and an added fix for the standard axes case. Since 5c75807 we have not bee... |
| 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 | 8201d0b7bc32164c4662de52242e463a356df543 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width