Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for ipywidgets 7.0 and JupyterLab 0.28 #21

Merged
merged 7 commits into from
Oct 29, 2017

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 28, 2017

Fixes #15.

  • Removed export button and fixed the handling of interactivity toggling.
  • Fixed the download image behavior since Chrome no longer supports data urls for window.open.

mpl-widget

@blink1073
Copy link
Member Author

@tacaswell @SylvainCorlay, I had one bug that I can't figure out. I sometimes get the following error that is cleared by restarting the kernel:

image

@blink1073
Copy link
Member Author

cc @jasongrout

@blink1073
Copy link
Member Author

Note that the video above shows it creating a new window to download. I changed it so that it automatically downloads '<figure_title>.png` without navigating away from the page.

@blink1073
Copy link
Member Author

Note that the following also works (should this close #9)?:

%matplotlib ipympl
import matplotlib.pyplot as plt

plt.plot([0, 1, 2, 2])
plt.show()

@blink1073
Copy link
Member Author

Found the source of the usage error:

https://github.com/ipython/ipython/blob/dfb458636b247a78f4a57206128caffd97035ea5/IPython/core/pylabtools.py#L27

Ensured that we always get "ipympl" in 676ea16.

@blink1073
Copy link
Member Author

Ah, the problem is that the addition of widget in IPython.core.pylabtools needed a corresponding addition to https://github.com/ipython/ipykernel/blob/71c44fe80e79126de4f27e6713fda1d274132d77/ipykernel/eventloops.py#L45.

@blink1073
Copy link
Member Author

PR: ipython/ipykernel#275

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Oct 29, 2017

Good catch for the IPython backend name!

@SylvainCorlay SylvainCorlay merged commit 2eb6bde into matplotlib:master Oct 29, 2017
@blink1073
Copy link
Member Author

Sweet! Can you add me to the PyPI maintainers?

@blink1073 blink1073 deleted the updates branch October 29, 2017 11:04
@SylvainCorlay
Copy link
Member

Done!

@blink1073 blink1073 restored the updates branch October 29, 2017 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compatibility with ipywidgets-7.0.0 and later ?
2 participants