You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that graphs printed as display(HTML(plot([{"x": [1, 2, 3], "y": [3, 1, 6]}], include_plotlyjs=True, output_type="div"))) are not visible in Notebook, only in JupyterLab.
I print them as a work around #1516 issue.
All examples are in the attached notebook, a minimal would be:
from IPython.display import display, HTML
import plotly.graph_objs as go
from plotly.offline import plot, iplot, init_notebook_mode
init_notebook_mode(connected=False)
display(HTML(plot([{"x": [1, 2, 3], "y": [3, 1, 6]}], include_plotlyjs=True, output_type="div")))
This approach isn't expected to work in the notebook (I'm honestly surprised that it works in JupyterLab). plotly.offline.iplot is specifically designed to display figures in the classic notebook.
You may be interested in checking out the renderers PR (#1474) that was merged in for 3.8.0. As it introduces a bunch of new options for displaying figures in different contexts.
I noticed that graphs printed as
display(HTML(plot([{"x": [1, 2, 3], "y": [3, 1, 6]}], include_plotlyjs=True, output_type="div")))
are not visible in Notebook, only in JupyterLab.I print them as a work around #1516 issue.
All examples are in the attached notebook, a minimal would be:
plotly 3.7.1
notebook 5.7.8
plotly figure html.ipynb.zip
The text was updated successfully, but these errors were encountered: