将绘图导出到 R 中的 powerpoint

Taz*_*Taz 7 plot powerpoint r plotly ggplotly

是否可以将plotly/ggplotly图导出到Powerpoint并保持其交互性?我的意思是,例如允许用户更改绘图线的颜色、粗细等。

示例代码:

set.seed(100)
d <- diamonds[sample(nrow(diamonds), 1000), ]
p <- ggplot(data = d, aes(x = carat, y = price)) + 
  geom_point(aes(text = paste("Clarity:", clarity))) +
  geom_smooth(aes(colour = cut, fill = cut)) + facet_wrap(~ cut)
gg <- ggplotly(p)
Run Code Online (Sandbox Code Playgroud)

顺便说一句,使用webshot包将绘图导出为.png文件不是解决方案。我应该能够编写这个解决方案,并从 R 或任何其他编程语言自动化 - 在线工具或任何其他应用程序,用户应该单击它来获取结果,但不能解决问题。