Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using plot.ly in jupyterlab - graphics does not show

I want to draw 3D PCA with pylot (Scatter3d), however the graphics is not showing up in jupyterlab only in jupyter-notebook.

I've installed the 'jupyterlab_plotly' package and I was able to create an 'jupyterlab_plotly.Plotly object', but I couldn't figure out how to actually include/draw the graphics in the notebook.

I wonder if someone could post a working example of drawing figures in jupyterlab with pyplot.

(The example at the project's git site - https://github.com/gnestor/jupyterlab_plotly- only present an 'jupyterlab_plotly.Plotly object', but not the graphics itself)

Thanks,

like image 241
obalasz Avatar asked Jun 08 '17 15:06

obalasz


People also ask

Why is plotly not showing in JupyterLab?

JupyterLab Problems In order to use plotly in JupyterLab, you must have the jupyterlab-plotly extension installed as detailed in the Getting Started guide. When you install plotly , this extension is automatically made available to any JupyterLab 3. x installation in the same Python environment.

How do you show plotly in Jupyter?

Simply visit plot.ly and select the + Create button in the upper right hand corner. Select Notebook and upload your Jupyter notebook (. ipynb) file!


2 Answers

I had the same issue. Looks like the project has moved over here: https://github.com/jupyterlab/jupyter-renderers Installing with the suggested: jupyter labextension install @jupyterlab/plotly-extension worked for me.

like image 194
user1561393 Avatar answered Sep 21 '22 17:09

user1561393


This is now superseded by jupyter labextension install jupyterlab-plotly as per https://plotly.com/python/getting-started/#jupyterlab-support-python-35

like image 45
eddygeek Avatar answered Sep 17 '22 17:09

eddygeek