-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Using iplot with ipython.display duplicates widgets in JupyterLab #1516
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
Comments
My current workaround - |
Hi @manycoding, The reason you're getting multiple displays in the notebook is because I haven't been following along closely, but it looks like the jupyter-widgets project may have just merged in support for saving/loading the widget state in the JupyterLab Notebook. See jupyter-widgets/ipywidgets#2265. It sounds like this might be the best solution for your usecase. |
@jonmmease So there is no other way to have both ipywidgets and graphs (printed with plotly) in the same cell without duplicating the first ones? |
I created the same issue for ipywidgets jupyter-widgets/ipywidgets#2359 because I am not sure where it belongs.
TL;DR If I plot a graph with plotly
iplot
, any ipywidgets are duplicated.The reason why I don't use
display()
andwidgets
for both is that widgets are not saved if I close a notebook, and I want the graph output to be available after I reopen a notebook.So I thought I can plot graphs with
plotly.offline.iplot()
and widgets withdisplay()
, but the former prints any available widget again and again.plotly 3.7.1
ipython 7.4.0
JupyterLab v0.35.4
Known labextensions:
app dir: /Users/valery/.local/share/virtualenvs/arche-lm24e12g/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v0.38.1 enabled OK
@jupyterlab/plotly-extension v0.18.2 enabled OK
plotlywidget v0.8.0 enabled OK
iplot_display_dupes.ipynb.zip
The text was updated successfully, but these errors were encountered: