Title: Add Figure parameter layout and discourage tight_layout / constrained_layout by timhoffm · Pull Request #19892 · matplotlib/matplotlib · GitHub
Open Graph Title: Add Figure parameter layout and discourage tight_layout / constrained_layout by timhoffm · Pull Request #19892 · matplotlib/matplotlib
X Title: Add Figure parameter layout and discourage tight_layout / constrained_layout by timhoffm · Pull Request #19892 · matplotlib/matplotlib
Description: PR Summary Having separate and competing parameters tight_layout and constrained_layout is not a great API choice and can cause confusion (#17339). This PR addresses the problem by introducing a new parameter layout and suggests to use it instead. Since tight_layout has been around for ages and is used probably a lot, I dare not right away deprecate the parameters and force all users to adapt. Therefore, tight_layout and constrained_layout are only marked as "discouraged" for now. (We might deprecate eventually some versions down the road). This is somewhat cumbersome, but IMHO the best way forward. I put the "discouraged" concept in as a proposal. This adds a bit of overhead in the docs and code-wise, but gently paves the way for a better API. Feedback is welcome. If this gets accepted, there will be followup actions: Update all examples to use layout. Consider adding a new rcParams['figure.layout'] value to unify defaults as well. This needs a bit fiddling to get proper fallbacks to the existing defaults, but we should be able to make it work "as one would expect".
Open Graph Description: PR Summary Having separate and competing parameters tight_layout and constrained_layout is not a great API choice and can cause confusion (#17339). This PR addresses the problem by introducing a ne...
X Description: PR Summary Having separate and competing parameters tight_layout and constrained_layout is not a great API choice and can cause confusion (#17339). This PR addresses the problem by introducing a ne...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/19892
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:05b6024d-9e00-1ae5-71b5-9c74b90183b5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CCCE:23E45A:107E131:15C0A4E:6A51A518 |
| html-safe-nonce | 9c5eb7372b43175e1f035e067094624e67a947183ce8eeab784ca5bfea254235 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0NFOjIzRTQ1QToxMDdFMTMxOjE1QzBBNEU6NkE1MUE1MTgiLCJ2aXNpdG9yX2lkIjoiMTE0ODU1MzgzMzg4ODE5NTg2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c87a9f05f388f6fb501a3962ad68ad4a0a8bb1866e3eb3c8d7729a91cdea8c41 |
| hovercard-subject-tag | pull_request:611012123 |
| 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/19892/files |
| twitter:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2836374?s=400&v=4 |
| og:image:alt | PR Summary Having separate and competing parameters tight_layout and constrained_layout is not a great API choice and can cause confusion (#17339). This PR addresses the problem by introducing a ne... |
| 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 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width