简体   繁体   English

嵌入绘图

[英]Embed plotly graphs

so I know that with plolty and chart studio we can save our plots online and then have an embedded link ready but there is a file limit and after publishing three small plots I get errors and can't publish anything else.所以我知道使用 polty 和 chart studio,我们可以在线保存我们的绘图,然后准备好嵌入的链接,但有文件限制,在发布三个小绘图后,我出现错误并且无法发布任何其他内容。

Is there any chance I either convert Plotly graph as javascript (as it's built with JS) and then save that somewhere to embed it later?我是否有机会将 Plotly 图转换为 javascript(因为它是用 JS 构建的),然后将其保存在某处以便稍后嵌入? I'm still very new to this and don't understand everything from it.我对此仍然很陌生,并且不了解其中的所有内容。

My end goal is to embed my Plotly graphs in an article.我的最终目标是在文章中嵌入我的 Plotly 图。 Any help?有什么帮助吗?

There are several options to export a ploty graph to be used elsewhere:有几个选项可以导出要在其他地方使用的绘图图:

  • as a static image - once you have your fig you would use fig.write_image() and then embed that image in your article/website/etc.作为静态图像- 一旦你有了你的fig你将使用fig.write_image()然后将该图像嵌入到你的文章/网站/等中。 The details and options are detailed here .详细信息和选项在此处详述。

or要么

  • as interactive html - once you have your fig you would use fig.write_html("path/to/file.html") and then embed that html in your site (I think an iframe would be used in this case).作为交互式 html - 一旦你有了你的fig你将使用fig.write_html("path/to/file.html")然后将该 html 嵌入你的网站(我认为在这种情况下会使用 iframe)。 The details and options are detailed here .详细信息和选项在此处详述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM