Title: missing imshow() subplots when using tight_layout() · Issue #4976 · matplotlib/matplotlib · GitHub
Open Graph Title: missing imshow() subplots when using tight_layout() · Issue #4976 · matplotlib/matplotlib
X Title: missing imshow() subplots when using tight_layout() · Issue #4976 · matplotlib/matplotlib
Description: Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example: import numpy as np import matplotlib.pyplot as plt plt.figure() for i in range(16): ax= ...
Open Graph Description: Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example: import numpy as np import matplotlib.pyplot as p...
X Description: Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example: import numpy as np import matplotlib.pyplot ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4976
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"missing imshow() subplots when using tight_layout()","articleBody":"Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example:\n\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\nplt.figure()\nfor i in range(16):\n ax= plt.subplot(4,4 ,i+1)\n im=ax.imshow(np.random.normal(size=100).reshape([10,10]))\n plt.tight_layout()\n plt.title(i)\nplt.savefig(\"imshow_4x4.png\")\n```\n\ngenerates:\n\nWhereas the same loop with pcolor works:\n\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\nplt.figure()\nfor i in range(16):\n ax= plt.subplot(4,4 ,i+1)\n im=ax.pcolor(np.random.normal(size=100).reshape([10,10]))\n plt.tight_layout()\n plt.title(i)\nplt.savefig(\"pcolor_4x4.png\")\n```\n\ngives:\n\n\nIf I omit the tight_layout() call from the first example it works:\n\n\nI'm using matplotlib 1.4.3 and numpy 1.9.2 in Anaconda 2.2.0. \n","author":{"url":"https://github.com/douglase","@type":"Person","name":"douglase"},"datePublished":"2015-08-21T18:38:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/4976/matplotlib/issues/4976"}
| 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:e843492f-7ad2-f17e-e9aa-af5ff5020208 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8572:1F5181:23490:2F8F9:6A51C93B |
| html-safe-nonce | 27c8b2c0cd6b1487722c5d7c734e02639ea5e31a2a14484877dc66227f1f0249 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTcyOjFGNTE4MToyMzQ5MDoyRjhGOTo2QTUxQzkzQiIsInZpc2l0b3JfaWQiOiI5MjAzNTQ2OTAzMzkxODgxNTMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 36a95b10c41302fb44b5818a978c8bf4092c65bf739bda0a468f5a3c274a2e13 |
| hovercard-subject-tag | issue:102440004 |
| 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/4976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5bd4fb722fa36575a93cb10e5924cdac6e416a787fd4a34c2bb0c00cb156f74/matplotlib/matplotlib/issues/4976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5bd4fb722fa36575a93cb10e5924cdac6e416a787fd4a34c2bb0c00cb156f74/matplotlib/matplotlib/issues/4976 |
| og:image:alt | Hello, I've found an unexpected behavior when I make grids of subplots with imshow and tight_layout the second to last plot is missing, for example: import numpy as np import matplotlib.pyplot as p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | douglase |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width