wordcloud2 icon indicating copy to clipboard operation
wordcloud2 copied to clipboard

Save letterCloud as a local file

Open lbocken opened this issue 6 years ago • 2 comments

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 !

lbocken avatar Jun 29 '18 01:06 lbocken

Solved by #8?

krlmlr avatar Jan 24 '20 15:01 krlmlr

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

reblake avatar Jan 26 '21 22:01 reblake