Title: Multicursor disappears when not moving on nbagg with useblit=False + burns CPU · Issue #19633 · matplotlib/matplotlib · GitHub
Open Graph Title: Multicursor disappears when not moving on nbagg with useblit=False + burns CPU · Issue #19633 · matplotlib/matplotlib
X Title: Multicursor disappears when not moving on nbagg with useblit=False + burns CPU · Issue #19633 · matplotlib/matplotlib
Description: Bug report Bug summary When on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend. Additionally I noticed that when I add the multicursor my cpu usage jumps and th...
Open Graph Description: Bug report Bug summary When on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend. Additionally I noticed that when I add t...
X Description: Bug report Bug summary When on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend. Additionally I noticed that when I add t...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19633
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multicursor disappears when not moving on nbagg with useblit=False + burns CPU","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\nWhen on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend.\r\n\r\nAdditionally I noticed that when I add the multicursor my cpu usage jumps and the kernel busy indicator constantly flashes on and off. \r\n\r\nShowing the plot without the multicursor:\r\n\r\nand with the multicursor (just displaying, not interacting with the plot):\r\n\r\n\r\nThat usage is pretty stable and my laptop's fan goes wild.\r\n\r\nThe issue with the dissappearing was originally noticed by @ipcoder in https://github.com/matplotlib/ipympl/issues/306\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\n%matplotlib nbagg\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.widgets import MultiCursor\r\n\r\nt = np.arange(0.0, 2.0, 0.01)\r\ns1 = np.sin(2*np.pi*t)\r\ns2 = np.sin(4*np.pi*t)\r\n\r\nfig, (ax1, ax2) = plt.subplots(2, sharex=True)\r\nax1.plot(t, s1)\r\nax2.plot(t, s2)\r\n\r\nmulti = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1, useblit=False)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\nand the high CPU usage\r\n\r\n\r\n**Expected outcome**\r\nRed line doesn't disappear + my CPU doesn't get crushed.\r\n\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\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: Ubuntu\r\n * Matplotlib version (`import matplotlib; print(matplotlib.__version__)`): '3.3.4.post2456+gfd23bb238'\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): nbagg\r\n * Python version: '3.9.1 | packaged by conda-forge | (default, Jan 26 2021, 01:34:10) \\n[GCC 9.3.0]'\r\n * Jupyter version (if applicable): Notebook 6.2.0 - IPython 7.20.0\r\n\r\ndev instlal of maptlotlib + conda-forge for the others \r\n","author":{"url":"https://github.com/ianhi","@type":"Person","name":"ianhi"},"datePublished":"2021-03-03T23:33:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/19633/matplotlib/issues/19633"}
| 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:20845e03-d41f-d630-0fcb-09aeb5736481 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89E2:1EECE0:17A0982:2014DE3:6A5238CD |
| html-safe-nonce | a5515ab7d2db870b78f5be7c0910786f12747401d9daa1c0212124d12a890b00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUUyOjFFRUNFMDoxN0EwOTgyOjIwMTRERTM6NkE1MjM4Q0QiLCJ2aXNpdG9yX2lkIjoiNjQ3ODk3MTA2MTI5MTU5NTk4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | be61f0abd65e94a88125801d3ca4b489ad76f5c3fa064baf34f54a1e1c32fc8d |
| hovercard-subject-tag | issue:821591059 |
| 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/19633/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8938e5704c927e4c098702aa814196580c7340ebd29cd373a49e1d10a4767bfc/matplotlib/matplotlib/issues/19633 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8938e5704c927e4c098702aa814196580c7340ebd29cd373a49e1d10a4767bfc/matplotlib/matplotlib/issues/19633 |
| og:image:alt | Bug report Bug summary When on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend. Additionally I noticed that when I add t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ianhi |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width