wordcloud2
wordcloud2 copied to clipboard
Save letterCloud as a local file
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 !
Solved by #8?
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