Save .png by webshot in R

和自甴很熟 提交于 2019-12-08 07:57:22

问题


I'm using webshot to save a png file from HTML :

p <- plot_ly(plotly::wind, r = ~r, t = ~t) %>% add_area(color = ~nms)%>%
 layout(radialaxis = list(ticksuffix = "%"), orientation = 270)

saveWidget(as.widget(p), "temp.html")
webshot("temp.html",file = "temp.png",cliprect = "viewport")

This is giving me a plot like this. It returns a small image in the upper left corner. What should I do to have a full-size image in a center?

来源:https://stackoverflow.com/questions/48289771/save-png-by-webshot-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!