【问题标题】:Python/Plotly Offline export result into Image instead of html filePython/Plotly 离线将结果导出为 Image 而不是 html 文件
【发布时间】:2020-09-29 13:05:00
【问题描述】:

如何将我的 PLOTLY 结果离线导出为 Image(png、jpeg、jpg)或 pdf 而不是 html 格式?

filename="test.html"
plotly.offline.plot(fig, filename=filename,show_link=False,auto_open=False)

如果没有直接的解决方案,我以后如何将此html plotly结果转换为ppt/pdf/image?

【问题讨论】:

  • 看看情节逆戟鲸。这是 plotly 背后的绘图引擎,可以导出为 PNG。

标签: python plotly offline


【解决方案1】:

您可以使用以下命令创建static export

fig.write_image("my_fig.png")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-07
    • 2017-05-27
    • 2018-03-24
    • 2020-04-10
    • 2021-12-08
    • 1970-01-01
    相关资源
    最近更新 更多