plots in Jupyter notebooks exports to HTML do not show without internet connection
See original GitHub issueA Jupyter notebook exported to HTML produces the error message
Uncaught ReferenceError: require is not defined
in Chrome when there is no internet connection. The plot does not show, there is only blank space where it should be.
reproducable example:
import plotly.express as px
iris = px.data.iris()
px.scatter(iris, x="sepal_width", y="sepal_length", color="petal_length")
and after:
jupyter nbconvert --to html ...
Exporting the plot directly with fig.write(...)
works fine, both online and offline.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Exporting Jupyter notebook with plotly to html not displaying ...
If I turn on my internet connection the plots are rendered, just fine. Here is a sample code: import pandas as pd import...
Read more >HTML export from Jupyter Notebook for offline viewing
When I export HTML from Jupyter Notebook, the plot.ly figures only show if there is an internet connection. Otherwise, I get the following ......
Read more >Bokeh plot not rendering in Jupyter Notebook saved to html ...
Hi All,. I'm trying to get Bokeh plots to render in Jupyter Notebooks saved to html output which then need to be viewed...
Read more >3 ways to export Jupyter Notebook to HTML - MLJAR
The most strightforward way to get HTML file from Jupyter Notebook is to use Download as function inside the Jupyter application. Please click ......
Read more >Jupyter Notebook as a Product - Towards Data Science
The bottom line exports the notebook to HTML. To html specifies the format, and no input, no prompt hide the code. The end...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please see my answer in the forum https://community.plot.ly/t/html-export-from-jupyter-notebook-for-offline-viewing/32104/13 I had missed an important information about the lack of internet connection, Does
work for you?
This is the clearest explanation I’ve been able to write 😃 https://github.com/plotly/plotly.py/issues/931#issuecomment-819502866