Title: Fix colorbar aspect when colorbar created, not its axes... by jklymak · Pull Request #22100 · matplotlib/matplotlib · GitHub
Open Graph Title: Fix colorbar aspect when colorbar created, not its axes... by jklymak · Pull Request #22100 · matplotlib/matplotlib
X Title: Fix colorbar aspect when colorbar created, not its axes... by jklymak · Pull Request #22100 · matplotlib/matplotlib
Description: PR Summary Closes #22087 (?) Creating a colorbar axes and then subsequently setting its aspect ratio after creation, but before creating the colorbar, failed after #20501. That is because the new colorbar logic consults cax._colorbar_info for the aspect ratio of the colorbar, and we were setting that when the colorbar axes was created. Here we change the logic so the aspect ratio is not set until the colorbar is put into the axes. #22087 is still broken in that users used to be able to set the aspect ratio via cax.set_aspect, whereas now we are using cax.set_box_aspect. That could maybe be fixed. We probably should also allow a way for colorbars to reset their aspect ratio (#20588). 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: PR Summary Closes #22087 (?) Creating a colorbar axes and then subsequently setting its aspect ratio after creation, but before creating the colorbar, failed after #20501. That is because the new ...
X Description: PR Summary Closes #22087 (?) Creating a colorbar axes and then subsequently setting its aspect ratio after creation, but before creating the colorbar, failed after #20501. That is because the new ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/22100
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:02906463-b533-4a24-b122-da09c91d0e81 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D93E:F7027:29954:37013:6A51CBF5 |
| html-safe-nonce | 1878656d95261a6562f1f84833af3d8b7f28cc6b0430a46414513ad23b7eaba1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTNFOkY3MDI3OjI5OTU0OjM3MDEzOjZBNTFDQkY1IiwidmlzaXRvcl9pZCI6IjMxNzQ0Nzk0NjIwNTA5NDE5NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9f7bad148367f9cbf6c8f92bb35c85759354b033c003d8656f01a71550fdd31e |
| hovercard-subject-tag | pull_request:813403488 |
| 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/22100/files |
| twitter:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| og:image:alt | PR Summary Closes #22087 (?) Creating a colorbar axes and then subsequently setting its aspect ratio after creation, but before creating the colorbar, failed after #20501. That is because the new ... |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width