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

Display of plot is missing: Show plot/graph/chart/.. in jupyter lab #jupyter #1699

Open
ksuess opened this issue Aug 1, 2019 · 3 comments
Open
Assignees

Comments

@ksuess
Copy link

ksuess commented Aug 1, 2019

pyenv with
plotly 4.0.0

image
Where is the plot; what is necessary to install/ configure?

@ksuess ksuess changed the title Display of plot is missing: Show plot/graph/chart/.. in jupyter lab Display of plot is missing: Show plot/graph/chart/.. in jupyter lab #jupyter Aug 1, 2019
@nicolaskruchten
Copy link
Member

There are some additional instructions for getting JupyterLab to render figures: https://plot.ly/python/getting-started/#jupyterlab-support-python-35

@fkromer
Copy link

fkromer commented Aug 16, 2019

@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?

@mustafaikizler
Copy link

Any Update? Thanks

@gvwilson gvwilson self-assigned this Jun 13, 2024
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

No branches or pull requests

5 participants