【发布时间】:2020-10-12 13:57:05
【问题描述】:
我在 R 中使用 plotly() 创建了一个交互式绘图图表,我想将其保存为文件。
我可以接受任何格式,无论是 js 还是 html 或其他格式。我想保持交互性。
这是我的代码
gg <-
iris %>%
ggplot(aes(Species, Sepal.length)) +
geom_col(fill = "green")
ggplotly(gg)
我在this answer 上读到,您可以在 Plotly 的 Python 实现中执行 plotly.offline.plot(data, filename='file.html')。我的目标是使用“上传文件”功能将绘图图表上传到 Notion 文档。
【问题讨论】: