Title: [Bug]: constrained layout with wrapped titles · Issue #25336 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: constrained layout with wrapped titles · Issue #25336 · matplotlib/matplotlib
X Title: [Bug]: constrained layout with wrapped titles · Issue #25336 · matplotlib/matplotlib
Description: Bug summary When titles are long and wrapped, constrained layout doesn't leave enough room for them. Code for reproduction import matplotlib.pyplot as plt fig, ax_arr = plt.subplots(2, 2, figsize=(3, 3), layout="constrained") fig.suptitl...
Open Graph Description: Bug summary When titles are long and wrapped, constrained layout doesn't leave enough room for them. Code for reproduction import matplotlib.pyplot as plt fig, ax_arr = plt.subplots(2, 2, figsize=(...
X Description: Bug summary When titles are long and wrapped, constrained layout doesn't leave enough room for them. Code for reproduction import matplotlib.pyplot as plt fig, ax_arr = plt.subplots(2, 2, figsi...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25336
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: constrained layout with wrapped titles","articleBody":"### Bug summary\n\nWhen titles are long and wrapped, constrained layout doesn't leave enough room for them.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax_arr = plt.subplots(2, 2, figsize=(3, 3), layout=\"constrained\")\r\nfig.suptitle(\"suptitle that is clearly too long in this case\", wrap=True)\r\nax_arr[1, 0].set_title(\"axes title that is too long for the size\", wrap=True)\r\nplt.savefig(\"test.png\")\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nEnough space for the titles.\n\n### Additional information\n\nThere's no problem if the titles have an explicit new line (\"\\n\"), so this seems to be specific to the wrapping.\n\n### Operating system\n\nRHEL7\n\n### Matplotlib Version\n\n3.7.0 and main\n\n### Matplotlib Backend\n\nQtAgg\n\n### Python version\n\n3.11.0\n\n### Jupyter version\n\nN/A\n\n### Installation\n\nconda","author":{"url":"https://github.com/rcomer","@type":"Person","name":"rcomer"},"datePublished":"2023-02-27T18:15:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/25336/matplotlib/issues/25336"}
| 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:34b8c79c-e58a-94e7-65eb-5c28d301d9b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C97E:1C3DD7:17864FE:1F6D463:6A52BAFB |
| html-safe-nonce | da1419886e70254814b2662a82ad87449ba4e10f16b997b44a0ce6ce69fc7b3e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTdFOjFDM0RENzoxNzg2NEZFOjFGNkQ0NjM6NkE1MkJBRkIiLCJ2aXNpdG9yX2lkIjoiNDgzMjA3NDQ2MzA0OTg1Nzc4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 664869f935186a4a9923f445a3b7ae0b8529a3e95fd2a8df2a0b7fbca735ad02 |
| hovercard-subject-tag | issue:1601711838 |
| 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/25336/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1761777b4149d5bdddbbaa7ff3a08d1db276fd931ce6ea8596546bb967a08fce/matplotlib/matplotlib/issues/25336 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1761777b4149d5bdddbbaa7ff3a08d1db276fd931ce6ea8596546bb967a08fce/matplotlib/matplotlib/issues/25336 |
| og:image:alt | Bug summary When titles are long and wrapped, constrained layout doesn't leave enough room for them. Code for reproduction import matplotlib.pyplot as plt fig, ax_arr = plt.subplots(2, 2, figsize=(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rcomer |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width