Title: constrained_layout fails on suptitle+colorbars+some figure sizes · Issue #17712 · matplotlib/matplotlib · GitHub
Open Graph Title: constrained_layout fails on suptitle+colorbars+some figure sizes · Issue #17712 · matplotlib/matplotlib
X Title: constrained_layout fails on suptitle+colorbars+some figure sizes · Issue #17712 · matplotlib/matplotlib
Description: Bug report Bug summary After from pylab import * fig = plt.figure(figsize=(8, 5), constrained_layout=True) fig.suptitle("foo") axs = fig.subplots(1, 2, sharex=True, sharey=True) im = axs[0].imshow([[1, 2], [3, 4]]) fig.colorbar(im, ax=ax...
Open Graph Description: Bug report Bug summary After from pylab import * fig = plt.figure(figsize=(8, 5), constrained_layout=True) fig.suptitle("foo") axs = fig.subplots(1, 2, sharex=True, sharey=True) im = axs[0].imshow(...
X Description: Bug report Bug summary After from pylab import * fig = plt.figure(figsize=(8, 5), constrained_layout=True) fig.suptitle("foo") axs = fig.subplots(1, 2, sharex=True, sharey=True) im = axs[...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17712
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"constrained_layout fails on suptitle+colorbars+some figure sizes","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nAfter\r\n\r\n```python\r\nfrom pylab import *\r\n\r\nfig = plt.figure(figsize=(8, 5), constrained_layout=True)\r\nfig.suptitle(\"foo\")\r\naxs = fig.subplots(1, 2, sharex=True, sharey=True)\r\nim = axs[0].imshow([[1, 2], [3, 4]])\r\nfig.colorbar(im, ax=axs[0], orientation=\"horizontal\")\r\nim = axs[1].imshow([[1, 2], [3, 4]])\r\nfig.colorbar(im, ax=axs[1], orientation=\"horizontal\")\r\nplt.show()\r\n```\r\nand toggling manually to fullscreen, one gets\r\n\r\ni.e. the suptitle is placed too low.\r\n\r\nNote that this doesn't happen if the call to suptitle() comes *last* instead of *first*.\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: linux\r\n * Matplotlib version: master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): gui+agg/mplcairo\r\n * Python version: 38\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2020-06-22T10:25:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/17712/matplotlib/issues/17712"}
| 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:d3a17cdf-28c4-38b6-5ac5-a627bfab9c9f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C874:29ED71:94201:C7A8C:6A532BC0 |
| html-safe-nonce | fbeb1fb511bc5707215f3bb095a7e5c9295a461c623e6a2eb1c1340de8b8d4fc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODc0OjI5RUQ3MTo5NDIwMTpDN0E4Qzo2QTUzMkJDMCIsInZpc2l0b3JfaWQiOiIyOTQ5MTEwNTk2NjEwNzYzNzEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f575efdd30bc4d2f7d7ab0613fd16f612538bee1c53848529a5e89b5369c2a96 |
| hovercard-subject-tag | issue:642948812 |
| 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/17712/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ee1f946a39ba367fa751f1750fbdc1862fdfa5c90636faeacc0ca73b9365609b/matplotlib/matplotlib/issues/17712 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ee1f946a39ba367fa751f1750fbdc1862fdfa5c90636faeacc0ca73b9365609b/matplotlib/matplotlib/issues/17712 |
| og:image:alt | Bug report Bug summary After from pylab import * fig = plt.figure(figsize=(8, 5), constrained_layout=True) fig.suptitle("foo") axs = fig.subplots(1, 2, sharex=True, sharey=True) im = axs[0].imshow(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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