Display of plot is missing: Show plot/graph/chart/.. in jupyter lab #jupyter
pyenv with plotly 4.0.0
Where is the plot; what is necessary to install/ configure?
There are some additional instructions for getting JupyterLab to render figures: https://plot.ly/python/getting-started/#jupyterlab-support-python-35
@nicolaskruchten The instructions don't work for JupyterLab v1.0.5. After building the extensions there I've a white screen showing nothing. Could you update the instructions pls?
EDIT: Seems like the extensions have not been activated... The instructions in the docs are working with this Setup on Windows (however should be OS-independent, npm version should be irrelevant as well):
>python --version
Python 3.6.8
>virtualenv --version
16.7.2
>jupyter lab --version
1.0.5
>node --version
v10.16.3
>npm --version
6.9.0
>jupyter labextension list
JupyterLab v1.0.5
Known labextensions:
app dir: c:\users\florian\gitlab\bp_demo\bp_demo\share\jupyter\lab
@jupyter-widgets/jupyterlab-manager v1.0.2 enabled ok
@jupyterlab/plotly-extension v1.0.0 enabled ok
jupyterlab-chart-editor v1.2.0 enabled ok
jupyterlab-plotly v1.1.0 enabled ok
plotlywidget v1.1.0 enabled ok
Plain
import plotly.graph_objects as go
f = go.FigureWidget()
f
without any other previous setup generates an epty figure like expected.
This example adjusted (fig.show() -> fig, go.Figure(...) -> go.FigureWidget(...)) (with FigureWidget) works as well:
import plotly.graph_objects as go
import numpy as np
N = 1000
t = np.linspace(0, 10, 100)
y = np.sin(t)
fig = go.FigureWidget(data=go.Scatter(x=t, y=y, mode='markers'))
fig
However plotlyexpress (even if adapted fig.show() -> fig)
import plotly.express as px
iris = px.data.iris()
fig = px.scatter(iris, x="sepal_width", y="sepal_length")
fig
does not work (white screen instead of plot). How can I display express figures as well? The setup should work when using nodeenv as well, right?
Any Update? Thanks