如何获取ggplotly图的HTML代码

时间:2016-08-22 23:47:01

标签: html r ggplot2 plotly

下面的代码构建了一个交互式图,我希望将其集成到我的wordpress文章中:

# interactive plot with ribbon
test <- ggplot(data = wide.data, aes(x = x, y = pred)) +
  geom_ribbon(aes(ymin = lwr, ymax = upr, fill = model), alpha = .5) + 
  geom_point(aes( group = model, fill = model)) + 
  labs(x = "Number of Games Played", y = "Total Number of Goals") + scale_y_continuous(breaks=seq(0,70,5)) +
  scale_x_continuous(breaks=seq(0,50,5))

ggplotly(test)

我需要将我给出的情节翻译成HTML,我不太清楚如何做到这一点。

非常感谢任何帮助。

0 个答案:

没有答案