【问题标题】:Embedding Plotly interactive graphs into blog without losing animation将 Plotly 交互式图表嵌入博客而不丢失动画
【发布时间】:2018-11-05 21:39:20
【问题描述】:

我想在我的博客中嵌入一个动画图表(类似于this one)。我无法使用共享或建议的任何其他选项 here 呈现动画图。有没有办法我可以做到这一点?该图最初是在 Jupyter 笔记本中使用离线绘图创建的。任何帮助是极大的赞赏。

【问题讨论】:

    标签: python plotly


    【解决方案1】:

    您只需添加 plotly 在线编辑器嵌入选项中提供的 iframe,通过下面给出的代码。

    <iframe width="900" height="800" frameborder="0" scrolling="no" src="//plot.ly/~kai1992cool/20.embed"></iframe>
    

    请尝试并告诉我进展如何!

    【讨论】:

    • 感谢您抽出宝贵时间回答我的问题。但是,我的问题不是关于在 Jupyter Notebook 中呈现图形。该图本身是在 Jupyter Notebook 中生成的,我想将其嵌入博客中。我知道通过将其下载为 html 来嵌入绘图图的常用方法,但是在这种情况下,由于动画,html 文件太大了。所以问题是关于在博客中嵌入动画绘图。
    • @AashitaKesarwani 这个博客是用 wordpress 还是 blogger 制作的?为什么不能只在博客内容中使用 iframe?
    • @AashitaKesarwani 如果将内容&lt;iframe width="900" height="800" frameborder="0" scrolling="no" src="//plot.ly/~kai1992cool/20.embed"&gt;&lt;/iframe&gt;放在页面内,我的理解会呈现!
    • 我正在使用 Jekyll 在 Github Pages 上托管博客。感谢最后的评论,成功了!我试图使用 html,但页面构建会失败。它适用于嵌入 iframe!非常感谢您帮助我解决问题。
    猜你喜欢
    • 2021-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-23
    • 1970-01-01
    • 1970-01-01
    • 2015-05-16
    • 2020-01-13
    相关资源
    最近更新 更多