Title: Nbagg backend by pelson · Pull Request #3008 · matplotlib/matplotlib · GitHub
Open Graph Title: Nbagg backend by pelson · Pull Request #3008 · matplotlib/matplotlib
X Title: Nbagg backend by pelson · Pull Request #3008 · matplotlib/matplotlib
Description: Implements the nbAgg backend for interactive figures in the IPython notebook, using IPython's comm protocol. @jasongrout's excellent proof of concept CommFigure in #2524 was used as an initial base (which itself made good use of @mdboom and my own work on the WebAgg backend), but I've removed the CommFigure concept and have instead plumbed this into a real matplotlib backend. As a result, using IPython notebook v2.0 I am able to run the following code in the notebook to achieve an interactive figure: import matplotlib matplotlib.use('nbagg') import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2 * np.pi, 1000) plt.plot(x, np.cos(3*x) - np.sin(2*x)**2) plt.show() I've currently only been able to test this with Firefox 24.4, so any feedback from other browsers would be valuable. There are a few features I've not added at this point (but would like to do so): An event loop Support for interactive mode and the ability to "re-show" a figure. Better keyboard event integration with IPython notebook (currently pressing the close button destroys all IPython keyboard events, and when the mpl figure has focus, no IPython shortcuts are triggered) Remove the hack which identifies which cell contains the output that has just been written (using the unique ID defined at show time of a figure). Adding %matplotlib nbagg (in IPython itself) Testing... (at least a user acceptance test script for individuals to run).
Open Graph Description: Implements the nbAgg backend for interactive figures in the IPython notebook, using IPython's comm protocol. @jasongrout's excellent proof of concept CommFigure in #2524 was used as an init...
X Description: Implements the nbAgg backend for interactive figures in the IPython notebook, using IPython's comm protocol. @jasongrout's excellent proof of concept CommFigure in #2524 was used as...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/3008
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a3a18e14-56a9-1958-c436-b18d0ff5ad1f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E03E:15E3B:DA7B7B:12796D7:6A5327EC |
| html-safe-nonce | 8d39c7782ebf5d95afe38ca03495b9cd1e93351afd62e5c70fb596f3be3ed07e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDNFOjE1RTNCOkRBN0I3QjoxMjc5NkQ3OjZBNTMyN0VDIiwidmlzaXRvcl9pZCI6IjU2MjExNjc0MTk3MDE3OTg4OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8655da89d20638079d3b34b68e2befafd968a52a2cf10c1f7cf0ae9d65655834 |
| hovercard-subject-tag | pull_request:15118003 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/3008/files |
| twitter:image | https://avatars.githubusercontent.com/u/810663?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/810663?s=400&v=4 |
| og:image:alt | Implements the nbAgg backend for interactive figures in the IPython notebook, using IPython's comm protocol. @jasongrout's excellent proof of concept CommFigure in #2524 was used as an init... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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