Python 如何将HTML文件(从Plotly导出)嵌入Jupiter笔记本?

Python 如何将HTML文件(从Plotly导出)嵌入Jupiter笔记本?,python,plotly,Python,Plotly,我需要把这张图放进我的Jupiter笔记本。如何进行?谢谢单击图像右下角的“共享”。如果将其嵌入为iframe,请使用代码单元。如果将此代码复制并粘贴到单元格中,将得到一个交互式图形 import IPython iframe = '<iframe width="900" height="800" frameborder="0" scrolling="no" src="//plot.ly/~ekirzhner/6.embed"></iframe>' IPython.dis

我需要把这张图放进我的Jupiter笔记本。如何进行?谢谢

单击图像右下角的“共享”。如果将其嵌入为iframe,请使用代码单元。如果将此代码复制并粘贴到单元格中,将得到一个交互式图形

import IPython
iframe = '<iframe width="900" height="800" frameborder="0" scrolling="no" src="//plot.ly/~ekirzhner/6.embed"></iframe>'
IPython.display.HTML(iframe)
导入IPython
iframe=''
IPython.display.HTML(iframe)
要使用html导入静态图形,请在标记单元格中使用以下代码:

%%html

<div>
    <a href="https://plot.ly/~ekirzhner/6/" target="_blank" title="Plot 6" style="display: block; text-align: center;"><img src="https://plot.ly/~ekirzhner/6.png" alt="Plot 6" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a>
%%%html

我创建了一个笔记本文件,其中包含一个来自html选项的静态图形,以及一个带有交互式plotly图形的单元格,您可以下载它

是否希望它是一个交互式图形?或者你只是想将图形的png或jpeg图像加载到jupyter笔记本中?@David Rosenman Interactive html graph