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

Rendering of Plotly FigureWidget failed in JupyterLAb #32

Closed
sim-san opened this issue Feb 19, 2020 · 3 comments
Closed

Rendering of Plotly FigureWidget failed in JupyterLAb #32

sim-san opened this issue Feb 19, 2020 · 3 comments
Labels
bug Something isn't working as expected

Comments

@sim-san
Copy link

sim-san commented Feb 19, 2020

Describe the bug:
I write some libary which uses the Plotly FigureWidget to create some interactive plot. This plot runs in the normal jupyter notebook. But in the jupyter lab I only see the message: "loading widget..."

Expected behaviour:
TODO

Steps to reproduce the issue:
TODO

Technical details:

  • Workspace version: 0.8.7
  • Docker version: Docker version 19.03.5, build 633a0ea838
  • Host Machine OS (Windows/Linux/Mac): Linux
  • Command used to start the workspace: ml-hub
  • Browser (Chrome/Firefox/Safari): Firefox

Possible Fix:

While searching for the Jupyter-Lab extension I saw that the @jupyterlab/plotly extension is deprecated.

This package is being deprecated. Please use the Plotly-supported jupyterlab-plotly (https://www.npmjs.com/package/jupyterlab-plotly). See the plotly.py README for more info: https://github.com/plotly/plotly.py#jupyterlab-support-python-35)

Additional context:
Installation in the Dockerfile:

jupyter labextension install @jupyterlab/plotly-extension && \

@sim-san sim-san added the bug Something isn't working as expected label Feb 19, 2020
@sim-san
Copy link
Author

sim-san commented Feb 19, 2020

Steps to reproduce the issue:
Run this cell inside the jupyter lab

import plotly.graph_objects as go

f = go.FigureWidget()
f.add_scatter(y=[2, 1, 4, 3]);
f.add_bar(y=[1, 4, 3, 2]);
f.layout.title = 'Hello FigureWidget'
f.show()

@sim-san
Copy link
Author

sim-san commented Feb 19, 2020

A normal figure works:

import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(y=[2, 1, 4, 3]))
fig.add_trace(go.Bar(y=[1, 4, 3, 2]))
fig.update_layout(title = 'Hello Figure')
fig.show()

@lukasmasuch
Copy link
Contributor

Thanks for reporting. The issue seems to be fixed with the newest version (0.10.4).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants