question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standalone pages don't show Plotly figures

See original GitHub issue

Describe 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:

  1. Create a jupyter notebook mypage.ipynb with a Plotly figure
  2. Run jb build path/to/mypage.ipynb
  3. View the resulting html file
  4. 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:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mcmwrightcommented, Sep 20, 2020

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.

0reactions
chrisjsewellcommented, Sep 20, 2020

Awesome 😀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found