Standalone pages don't show Plotly figures
See original GitHub issueDescribe the bug
Since upgrading jupyter-book the figures produced by Plotly no longer appear when building standalone pages.
To Reproduce
Steps to reproduce the behavior:
- Create a jupyter notebook
mypage.ipynb
with a Plotly figure - Run
jb build path/to/mypage.ipynb
- View the resulting html file
- See no figure
Expected behavior
Plotly figures worked with my previous version of jupyter-book, sorry I don’t remember the version number but it used jb page ...
rather than jb build ...
for standalone pages.
Environment
- Python Version [e.g. 3.7.1]: 3.7.7
- Package versions or output of
jupyter-book --version
: 0.8.2 - Operating System: Windows 10
Additional context
I assume this is because jupyterbooks with Plotly content now need to load `require.js` in `_config.yml, but I don’t see how to do that with a standalone page.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Displaying figures in Python - Plotly
To display a figure using the renderers framework, you call the .show() method on a graph object figure, or pass the figure to...
Read more >python - Plotly Library do not showed anything - Stack Overflow
I don't have the chart_studio installed but it seems it wasn't used anyway in your code. So after commenting chart_studio import and adding ......
Read more >st.plotly_chart - Streamlit Docs
Display an interactive Plotly chart. Plotly is a charting library for Python. The arguments to this function closely follow the ones for Plotly's...
Read more >Plotly - Online and Offline Plotting - Tutorialspoint
Use plotly.offline.iplot() when working offline in a Jupyter Notebook to display the plot in the notebook. Note − Plotly's version 1.9.4+ is needed ......
Read more >Plots are not showing up | Data Science and Machine Learning
@mhjudi - I faced similar issue in plotly today. The below worked for me - plotly.offline.init_notebook_mode (connected = True). Do share if this...
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
BTW, I just built a standalone page from a notebook with a Julia kernel, using the Plotly backend to Plots.jl, and it the resulting figure displays in the html output without the need for a config file.
Awesome 😀