Title: ENH: add width_ratios and height_ratios to subplots by jklymak · Pull Request #23191 · matplotlib/matplotlib · GitHub
Open Graph Title: ENH: add width_ratios and height_ratios to subplots by jklymak · Pull Request #23191 · matplotlib/matplotlib
X Title: ENH: add width_ratios and height_ratios to subplots by jklymak · Pull Request #23191 · matplotlib/matplotlib
Description: PR Summary I'm guessing 99.9% of the use of gridspec_kws is to set the height or width ratios of axes. And it is pretty esoteric to ask people to know about gridspecs in order to access this. Here we add width_ratios and height_ratios to the subplots and subplot_mosaic calls. Previously we would do fig, axs = plt.subplots(1, 2, gridspec_kw={'width_ratios': [1, 2]}) This PR allows fig, axs = plt.subplots(1, 2, width_ratios=[1, 2]) 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 I'm guessing 99.9% of the use of gridspec_kws is to set the height or width ratios of axes. And it is pretty esoteric to ask people to know about gridspecs in order to access this. ...
X Description: PR Summary I'm guessing 99.9% of the use of gridspec_kws is to set the height or width ratios of axes. And it is pretty esoteric to ask people to know about gridspecs in order to access th...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/23191
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7231da66-77cb-a344-dc35-1673f703aeba |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 97B6:1C9E58:13BD67:1B600A:6A51119B |
| html-safe-nonce | 79cf2a0054862fe576664c8f078d1f0dd66c0989aaa8242725129c8146e2b46c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0I2OjFDOUU1ODoxM0JENjc6MUI2MDBBOjZBNTExMTlCIiwidmlzaXRvcl9pZCI6IjU2MDMwNDYwODA4MDE0NzcwMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 848efbabe05507cb6830affd552074228e8ba6da733b787e7a584be234cde824 |
| hovercard-subject-tag | pull_request:956150855 |
| 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/23191/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 I'm guessing 99.9% of the use of gridspec_kws is to set the height or width ratios of axes. And it is pretty esoteric to ask people to know about gridspecs in order to access this. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | f9137f6d981cbbfd780af369f80ce890b2d0d2d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width