Title: nbagg blit support · Issue #4288 · matplotlib/matplotlib · GitHub
Open Graph Title: nbagg blit support · Issue #4288 · matplotlib/matplotlib
X Title: nbagg blit support · Issue #4288 · matplotlib/matplotlib
Description: Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example: import matplotlib.pyplot as plt prev_artist = None cur_y = 0.1 def onclick_handle(event): """Should draw elevating green line on each mous...
Open Graph Description: Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example: import matplotlib.pyplot as plt prev_artist = None cur_y = 0.1 def onclick_handle(event): """Shoul...
X Description: Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example: import matplotlib.pyplot as plt prev_artist = None cur_y = 0.1 def onclick_handle(event): ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4288
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"nbagg blit support","articleBody":"Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example:\n\n``` python\nimport matplotlib.pyplot as plt\n\nprev_artist = None\ncur_y = 0.1\n\ndef onclick_handle(event):\n \"\"\"Should draw elevating green line on each mouse click\"\"\"\n global ax, bg, prev_artist, cur_y\n ax.figure.canvas.restore_region(bg)\n if prev_artist:\n prev_artist.remove()\n cur_y += 0.1\n prev_artist = ax.plot([0, 1], [cur_y, cur_y], 'g')[0]\n ax.draw_artist(prev_artist)\n ax.figure.canvas.blit(ax.bbox)\n print \"Drew line\"\n\nax = plt.gca()\nax.plot([0, 1], [0, 1], 'r')\n# ax.figure.canvas.draw()\nbg = ax.figure.canvas.copy_from_bbox(ax.bbox)\nax.figure.canvas.mpl_connect('button_press_event', onclick_handle)\n```\n\nWith `%matplotlib nbagg`, clicking on the plot doesn't cause any updates until the plot is re-drawn. With other backends (say qt) the plot updates immediately on clicking.\n\nAn unrelated oddity, if I uncomment the draw command and try re-drawing the figure just disappears (edit - on 1.4.3; seems fixed on 1.5.1dev1).\n\nIf it helps, IPython version is 2.3.0 and matplotlib is 1.4.3/1.5.1dev1; occurs on both chrome and firefox. [UAT including animation example](http://nbviewer.ipython.org/github/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb) more or less run fine.\n\n(Coincidental to the other nbagg animation issue just posted. Google led to [this post also](http://matplotlib.1069221.n5.nabble.com/blit-support-in-webagg-nbagg-backends-td43879.html).)\n","author":{"url":"https://github.com/azjps","@type":"Person","name":"azjps"},"datePublished":"2015-03-27T21:22:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/4288/matplotlib/issues/4288"}
| 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:eba9a6e1-e05c-07ca-8d8e-065b660a5f39 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A98C:19C73D:DDBF2:128D8F:6A52E01D |
| html-safe-nonce | 87069f15d4cd983cade2882dc5246a6baa34c5f6366375dc4523ea58cdd4ec4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOThDOjE5QzczRDpEREJGMjoxMjhEOEY6NkE1MkUwMUQiLCJ2aXNpdG9yX2lkIjoiNjg0MzM5NTU4NzQ5ODUwMDEyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fe72dd845715ff7031d8a46fc0661a09782392d8a02a003afde93fcab3a7c92d |
| hovercard-subject-tag | issue:64854120 |
| 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/4288/issue_layout |
| twitter:image | https://opengraph.githubassets.com/813409c2d49f9a36949bdb6c6d9939db6f7584d9004e3f792c0c9e66c372a762/matplotlib/matplotlib/issues/4288 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/813409c2d49f9a36949bdb6c6d9939db6f7584d9004e3f792c0c9e66c372a762/matplotlib/matplotlib/issues/4288 |
| og:image:alt | Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example: import matplotlib.pyplot as plt prev_artist = None cur_y = 0.1 def onclick_handle(event): """Shoul... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | azjps |
| 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