Title: [Bug]: Constrained Layout scaling of layouts with submerged spines · Issue #23290 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Constrained Layout scaling of layouts with submerged spines · Issue #23290 · matplotlib/matplotlib
X Title: [Bug]: Constrained Layout scaling of layouts with submerged spines · Issue #23290 · matplotlib/matplotlib
Description: Bug summary I think "constrained_layout=True" breaks the mosaic scaling. For example subplot D is smaller than subplot E in the "Actual Outcome". When I use plot.tight_layout() and contrained_layout=False the subplots are the same size a...
Open Graph Description: Bug summary I think "constrained_layout=True" breaks the mosaic scaling. For example subplot D is smaller than subplot E in the "Actual Outcome". When I use plot.tight_layout() and contrained_layou...
X Description: Bug summary I think "constrained_layout=True" breaks the mosaic scaling. For example subplot D is smaller than subplot E in the "Actual Outcome". When I use plot.tight_layout() ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23290
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Constrained Layout scaling of layouts with submerged spines","articleBody":"### Bug summary\n\nI think \"constrained_layout=True\" breaks the mosaic scaling. For example subplot D is smaller than subplot E in the \"Actual Outcome\". When I use plot.tight_layout() and contrained_layout=False the subplots are the same size as in the \"Expected Outcome\"\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\ndef identify_axes(ax_dict, fontsize=48):\n \"\"\"\n Helper to identify the Axes in the examples below.\n\n Draws the label in a large font in the center of the Axes.\n\n Parameters\n ----------\n ax_dict : dict[str, Axes]\n Mapping between the title / label and the Axes.\n fontsize : int, optional\n How big the label should be.\n \"\"\"\n kw = dict(ha=\"center\", va=\"center\", fontsize=fontsize, color=\"darkgrey\")\n for k, ax in ax_dict.items():\n ax.text(0.5, 0.5, k, transform=ax.transAxes, **kw)\n\nmosaic = \"\"\"AAADDD\n AAADDD\n BBBDDD\n BBBEEE\n CCCEEE\n CCCEEE\"\"\"\nfig = plt.figure(constrained_layout=True)\nax_dict = fig.subplot_mosaic(mosaic)\nidentify_axes(ax_dict)\n```\n\n\n### Actual outcome\n\n\n\n\n### Expected outcome\n\n\n\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nOS/X\n\n### Matplotlib Version\n\n3.5.1\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\n3.9.12\n\n### Jupyter version\n\n3.3.2\n\n### Installation\n\nconda","author":{"url":"https://github.com/lswenson","@type":"Person","name":"lswenson"},"datePublished":"2022-06-16T22:04:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/23290/matplotlib/issues/23290"}
| 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:587fa917-d4f2-df73-0f57-896f88122c68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EFC:1D4F69:B881B0:F6B905:6A531C47 |
| html-safe-nonce | 71623cd0def2210c6e161a2e65597a022a4b5c51d00516a90975049e72f9b952 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUZDOjFENEY2OTpCODgxQjA6RjZCOTA1OjZBNTMxQzQ3IiwidmlzaXRvcl9pZCI6IjY0MDA3MTkxMzY1NzA0MTYxOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b8f888e5f372fbdea9c22d11d6b374e166697cda48f335f4c3b6920b8c07b188 |
| hovercard-subject-tag | issue:1274129136 |
| 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/23290/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d6f14252c6f9f1c15b638c6e7908fc908ef5d2db7b289f243f2f33b5454c7bc/matplotlib/matplotlib/issues/23290 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d6f14252c6f9f1c15b638c6e7908fc908ef5d2db7b289f243f2f33b5454c7bc/matplotlib/matplotlib/issues/23290 |
| og:image:alt | Bug summary I think "constrained_layout=True" breaks the mosaic scaling. For example subplot D is smaller than subplot E in the "Actual Outcome". When I use plot.tight_layout() and contrained_layou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lswenson |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width