Lchiffon / wordcloud2

R interface to wordcloud for data visualization.
397 stars 113 forks source link

Save letterCloud as a local file #47

Open lbocken opened 6 years ago

lbocken commented 6 years ago

I have Rstudio v. 1.2.747 on Windows 10

From : https://www.r-graph-gallery.com/196-the-wordcloud2-library/ I tried the following code chunk without success, Ok for html but png is a white file... `

install webshot

library(webshot) webshot::install_phantomjs()

Make the graph

my_graph=letterCloud(demoFreq,"@",1)

save it in htmllibrary("htmlwidgets")

saveWidget(my_graph,"tmp.html",selfcontained = F)

and in png

webshot("tmp.html","fig_1.png", delay =5, vwidth = 480, vheight=480) `

Thank you very much for your help !

krlmlr commented 4 years ago

Solved by #8?

reblake commented 3 years ago

Nope, not solved by #8. I used the steps above, and it only saves a blank white page. The image renders fine in the Viewer pane of RStudio, but it's critical to be able to export to an image file (pdf, png, jpeg, etc.). See my comment here: https://github.com/Lchiffon/wordcloud2/issues/49#issuecomment-767871676