Title: imshow() subplots with shared axes generate unwanted white spaces · Issue #1789 · matplotlib/matplotlib · GitHub
Open Graph Title: imshow() subplots with shared axes generate unwanted white spaces · Issue #1789 · matplotlib/matplotlib
X Title: imshow() subplots with shared axes generate unwanted white spaces · Issue #1789 · matplotlib/matplotlib
Description: When plotting two (or more) subplots which share the same axes, I see large areas of white spaces within the plots as seen here: import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(2, 1, 1) ax.imsho...
Open Graph Description: When plotting two (or more) subplots which share the same axes, I see large areas of white spaces within the plots as seen here: import matplotlib.pyplot as plt import numpy as np fig = plt.figure(...
X Description: When plotting two (or more) subplots which share the same axes, I see large areas of white spaces within the plots as seen here: import matplotlib.pyplot as plt import numpy as np fig = plt.figure(...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/1789
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"imshow() subplots with shared axes generate unwanted white spaces","articleBody":"When plotting two (or more) subplots which share the same axes, I see large areas of white spaces within the plots as seen here:\n\n\n``` python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfig = plt.figure()\nax = fig.add_subplot(2, 1, 1)\nax.imshow(np.random.random((10,10)))\nax.autoscale(False)\nax2 = fig.add_subplot(2, 1, 2, sharex=ax, sharey=ax)\nax2.imshow(np.random.random((10,10)))\nax2.autoscale(False)\nplt.show()\n```\n\nThese white spaces persist even after `autoscale(False)`, `ax.set_xlim(0, 10)`, and/or `ax.set_xbound(0, 10)`. One way to get rid of the white spaces is to set `aspect=auto` in `imshow()`, but this is not always ideal.\nOne could also set a `figsize` and manually adjust the axes to get the image contained exactly within the figure without white spaces, but resizing the figure would make the white spaces appear again.\n\nIs there a way to correct for this behaviour?\n","author":{"url":"https://github.com/rycmak","@type":"Person","name":"rycmak"},"datePublished":"2013-02-27T07:49:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/1789/matplotlib/issues/1789"}
| 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:2fcb9e4e-a3da-7daf-56c7-0f39b67b6abc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 988C:25EC2E:BE58D6:FD26C6:6A53211F |
| html-safe-nonce | 299755dbf526d741e4de4a4e3caece40678af58f53ed9228fc78366e40466a0e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODhDOjI1RUMyRTpCRTU4RDY6RkQyNkM2OjZBNTMyMTFGIiwidmlzaXRvcl9pZCI6IjYwNzg0NDc2MDEyNDk4ODY0OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a4a0ff9d57482a1e998685a8762e3c7da2fe308ab7140798ce5ffc332658ec15 |
| hovercard-subject-tag | issue:11445158 |
| 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/1789/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7628d3436c68a80ea461006af1d9f17bac79de962c4bf8531b1cd823eb077245/matplotlib/matplotlib/issues/1789 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7628d3436c68a80ea461006af1d9f17bac79de962c4bf8531b1cd823eb077245/matplotlib/matplotlib/issues/1789 |
| og:image:alt | When plotting two (or more) subplots which share the same axes, I see large areas of white spaces within the plots as seen here: import matplotlib.pyplot as plt import numpy as np fig = plt.figure(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rycmak |
| 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