Title: AttributeError: 'NoneType' object has no attribute 'canvas' · Issue #5663 · matplotlib/matplotlib · GitHub
Open Graph Title: AttributeError: 'NoneType' object has no attribute 'canvas' · Issue #5663 · matplotlib/matplotlib
X Title: AttributeError: 'NoneType' object has no attribute 'canvas' · Issue #5663 · matplotlib/matplotlib
Description: Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -> xlim, twiny -> ylim). import matplotlib matplotlib.use('TkAgg') # same with 'agg' import matplot...
Open Graph Description: Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -> xlim, twiny -> ylim). import matplotlib matplotlib.use('...
X Description: Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -> xlim, twiny -> ylim). import matplotlib matplotlib...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5663
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AttributeError: 'NoneType' object has no attribute 'canvas'","articleBody":"Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -\u003e xlim, twiny -\u003e ylim).\n\n``` python\nimport matplotlib\nmatplotlib.use('TkAgg') # same with 'agg'\n\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax1 = fig.add_subplot(111)\n\nax2 = ax1.twinx()\nax2.remove()\n\nax3 = fig.add_subplot(111)\nax3.set_xlim([1, 5])\n\nplt.show()\n```\n\n``` python\nTraceback (most recent call last):\n File \"E:\\dev\\prs\\main\\test2.py\", line 13, in \u003cmodule\u003e\n ax3.set_xlim([1, 5])\n File \"e:\\dev\\envs\\py34_x86\\Python\\lib\\site-packages\\matplotlib\\axes\\_base.py\", line 2783, in set_xlim\n other.figure.canvas is not None):\nAttributeError: 'NoneType' object has no attribute 'canvas'\n```\n","author":{"url":"https://github.com/dessant","@type":"Person","name":"dessant"},"datePublished":"2015-12-11T21:26:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/5663/matplotlib/issues/5663"}
| 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:85a1d717-2b07-ad3a-e0aa-85e7b9eed232 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAE6:356616:506459:6CB78D:6A540D34 |
| html-safe-nonce | 2808b4ca418ff9243944e2bb029e88bf40f08b46ccf3a9fb4f84ba615b866ae7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUU2OjM1NjYxNjo1MDY0NTk6NkNCNzhEOjZBNTQwRDM0IiwidmlzaXRvcl9pZCI6IjU5ODY5MTQ0NDY4MTg3MDY0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 838c7659aaae8839aa35a7b0077c1442497f8f4169f02c4dc89f75a7dbf528c6 |
| hovercard-subject-tag | issue:121794635 |
| 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/5663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/063a7c83a27fac78a3425d4d8769b45301027f2dde84f596719dfe933daacd7f/matplotlib/matplotlib/issues/5663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/063a7c83a27fac78a3425d4d8769b45301027f2dde84f596719dfe933daacd7f/matplotlib/matplotlib/issues/5663 |
| og:image:alt | Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -> xlim, twiny -> ylim). import matplotlib matplotlib.use('... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dessant |
| 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