Title: fix subfigures wspace/hspace=None using rc defaults instead of zero by sanrishi · Pull Request #32098 · matplotlib/matplotlib · GitHub
Open Graph Title: fix subfigures wspace/hspace=None using rc defaults instead of zero by sanrishi · Pull Request #32098 · matplotlib/matplotlib
X Title: fix subfigures wspace/hspace=None using rc defaults instead of zero by sanrishi · Pull Request #32098 · matplotlib/matplotlib
Description: PR summary When subfigures() is called without a layout engine and only one of wspace/hspace is specified (e.g. wspace=0.2, hspace=None), the None value gets passed through GridSpec to SubplotParams which leaves the rcParam default (0.2) in place. This causes an unintended gap on the unspecified axis. The docs say None should mean zero when no layout engine is active, so coerce missing values to 0.0 before constructing the GridSpec. Fixes #32076 AI Disclosure I used generative AI (opencode) to help draft the implementation and tests, but the logic and review were done by a human. PR checklist "closes #32076" is in the body of the PR description to link the related issue new and changed code is tested 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 When subfigures() is called without a layout engine and only one of wspace/hspace is specified (e.g. wspace=0.2, hspace=None), the None value gets passed through GridSpec to SubplotParam...
X Description: PR summary When subfigures() is called without a layout engine and only one of wspace/hspace is specified (e.g. wspace=0.2, hspace=None), the None value gets passed through GridSpec to SubplotParam...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/32098
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7a1df469-9f61-324e-f83a-d4f7bc295452 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A544:26037E:E472B:143D58:6A637077 |
| html-safe-nonce | 4fbf1eb7078a9007dbf8e1a6363de5ef77afab134b1b2e40ded0d5352fb43b15 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTQ0OjI2MDM3RTpFNDcyQjoxNDNENTg6NkE2MzcwNzciLCJ2aXNpdG9yX2lkIjoiMjAzODI2NjU1NTkzMTk3Njg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 361ea9f9677ff28aa33fa6647b3ade73e7e2b784e42d11cd07921c73d9a5fc80 |
| hovercard-subject-tag | pull_request:4111745288 |
| 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/32098/files |
| twitter:image | https://avatars.githubusercontent.com/u/220483717?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/220483717?s=400&v=4 |
| og:image:alt | PR summary When subfigures() is called without a layout engine and only one of wspace/hspace is specified (e.g. wspace=0.2, hspace=None), the None value gets passed through GridSpec to SubplotParam... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e7b5617850fbcd6d10fe2b7c56398444bccb5f3a58a4a18c6d363971295bcd03 |
| 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 | aa341b3f432dc63fa9633042725aec601722a352 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width