Title: [ENH]: add width/height_ratios to subplots and friends · Issue #21942 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: add width/height_ratios to subplots and friends · Issue #21942 · matplotlib/matplotlib
X Title: [ENH]: add width/height_ratios to subplots and friends · Issue #21942 · matplotlib/matplotlib
Description: Currently we must do fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]}). This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possible. I don't see any reason we should not offer:...
Open Graph Description: Currently we must do fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]}). This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possible. I d...
X Description: Currently we must do fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]}). This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possi...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21942
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: add width/height_ratios to subplots and friends","articleBody":"\r\nCurrently we must do `fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]})`. This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possible. I don't see any reason we should not offer: `fig, ax = plt.subplots(1, 2, width_ratios=[2, 1])`. See also `plt.subplots_mosaic`. \r\n\r\nI'm not sure about the `wspace` and `hspace` parameters. They are somewhat fragile as they get changed by layout managers, but they could also be exposed. \r\n\r\nIn the case of a clash between *width_ratios* and `gridspec_kw={'width_ratios', []}` probably the lower-level call should win. \r\n\r\nMarking as Good First Issue, as hoisting this is quite easy, but any new contributors should probably watch this space for an OK as to whether this is generally acceptable. \r\n\r\n","author":{"url":"https://github.com/jklymak","@type":"Person","name":"jklymak"},"datePublished":"2021-12-14T08:03:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/21942/matplotlib/issues/21942"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c481a624-99e1-cb5f-482b-beb850c9d2dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89B0:1D9623:43FB5B:5C2225:6A51434F |
| html-safe-nonce | 003fceada9150941608670de10e8a74069777fb2a7d08c7bb537eca6a83ed783 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUIwOjFEOTYyMzo0M0ZCNUI6NUMyMjI1OjZBNTE0MzRGIiwidmlzaXRvcl9pZCI6IjkxMTg2NjI1MTgzNzM0MzQxOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 138b692a238c7cdb47d496c3704cf94b304377e02925c614b64a473d48ea5d8f |
| hovercard-subject-tag | issue:1079432008 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/21942/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1c06a78fdf0ac1bd806ce88ee5a02ecd8e567acdc72926ef92287f096e69888/matplotlib/matplotlib/issues/21942 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1c06a78fdf0ac1bd806ce88ee5a02ecd8e567acdc72926ef92287f096e69888/matplotlib/matplotlib/issues/21942 |
| og:image:alt | Currently we must do fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]}). This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possible. I d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jklymak |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b78565f6aa43cc5323c9935ec11b22cca7bb0a62 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width