Title: plt.subplot eats my subplots · Issue #11435 · matplotlib/matplotlib · GitHub
Open Graph Title: plt.subplot eats my subplots · Issue #11435 · matplotlib/matplotlib
X Title: plt.subplot eats my subplots · Issue #11435 · matplotlib/matplotlib
Description: Bug report Bug summary plt.subplot eats my subplots. But it doesn't completely digest them, since they are still there, just not shown. Creating a subplot grid with plt.subplots and in addition adding a plt.subplot removes those subplots...
Open Graph Description: Bug report Bug summary plt.subplot eats my subplots. But it doesn't completely digest them, since they are still there, just not shown. Creating a subplot grid with plt.subplots and in addition add...
X Description: Bug report Bug summary plt.subplot eats my subplots. But it doesn't completely digest them, since they are still there, just not shown. Creating a subplot grid with plt.subplots and in addition...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"plt.subplot eats my subplots","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\n`plt.subplot` eats my subplots. But it doesn't completely digest them, since they are still there, just not shown.\r\n\r\nCreating a subplot grid with `plt.subplots` and in addition adding a `plt.subplot` removes those subplots from the grid, which are under the newly created subplot. \r\nCreating the additional subplot via `fig.add_subplot` does not remove them.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nfig, ax = plt.subplots(2,3,\r\n subplot_kw={\"label\" : \"A\"}, \r\n gridspec_kw={'width_ratios':[1,1,3]})\r\nax[0,2].plot([1,2,3])\r\n\r\naxi = plt.subplot(133, label=\"B\")\r\naxi.plot([7,6,5], color=\"red\")\r\naxi.axis(\"off\")\r\n\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nThe expected outcome would be the same as with `fig.add_subplot`:\r\n\r\n\r\n```\r\naxi = fig.add_subplot(133, label=\"B\")\r\naxi.plot([7,6,5], color=\"red\")\r\naxi.axis(\"off\")\r\n```\r\n\r\n\r\n\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: Win 8.1\r\n * Matplotlib version: master\r\n * Matplotlib backend: Qt5Agg\r\n * Python version: 3.6\r\n","author":{"url":"https://github.com/ImportanceOfBeingErnest","@type":"Person","name":"ImportanceOfBeingErnest"},"datePublished":"2018-06-13T16:25:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/11435/matplotlib/issues/11435"}
| 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:c180da12-5443-4c2e-4479-f8825a8a9a87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FBA:20ED06:CE216A:112848F:6A52A61A |
| html-safe-nonce | 591f66808166eb882f548a6c3edf08c32d39faa2ae68ebb85fc15ad71a1fc72b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkJBOjIwRUQwNjpDRTIxNkE6MTEyODQ4Rjo2QTUyQTYxQSIsInZpc2l0b3JfaWQiOiI2OTQ5Mjc1OTU3NjcyNDQzMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9cdc61d71e051328e213ee9c4d7dcaedeb2206f5485d391845c42cee8b160fe1 |
| hovercard-subject-tag | issue:332070567 |
| 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/11435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d37b64f9a3e2b5be748684e67629f0206f9ac70156855891872440c26351e696/matplotlib/matplotlib/issues/11435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d37b64f9a3e2b5be748684e67629f0206f9ac70156855891872440c26351e696/matplotlib/matplotlib/issues/11435 |
| og:image:alt | Bug report Bug summary plt.subplot eats my subplots. But it doesn't completely digest them, since they are still there, just not shown. Creating a subplot grid with plt.subplots and in addition add... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ImportanceOfBeingErnest |
| 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