Displaying figures generated by Plotly.offline in a jupyter notebook

I’m using Jupyter Notebook to try some Plotly offline tutorial examples. I saved Jupyter notebook and opened it (filename.ipynb) later in html mode, not notebook mode. All the inline figures are displaying the first figure. Please take a look at the snapshot.
(Notice there’s a line of sort of warning: )
If I open the .ipynb in Jupyter Notebook and all the figures display correctly.

I tried Chrome and Edge browser to load the ipynb in html mode. Have the same issue.

I tried several matplotlib tutorial examples. Seems like they don’t have the issue. The figures can display correctly in html mode.

And thank you for the excellent works!

console warnings:

Hi @wangziheng,

I’m not sure I understand what you mean when you say you opened the notebook in “HTML mode”?
Are you exporting the notebook to an HTML file? Are you using a local Jupyter Notebook or a notebook on a cloud service? I ask because I don’t recognize the <inline script removed for security reasons> message.

-Jon

Thank you for prompt reply. Apologies for the confusion. When I open .ipynb file in a browser, it’s not editable and runnable. But we can see the output figures that saved by the owner of the ipynb file. The attached snapshot might be helpful to understand the situation. Thank you.

Hi @wangziheng,

The snapshot you included above is the GitHub preview of a notebook. GitHub previews don’t support rich HTML output in notebooks, so that’s why the plots don’t show up there. You can use nbviewer (https://nbviewer.jupyter.org/) to display a notebook stored in GitHub as a rich document that includes the plotly plots.

-Jon