Lchiffon / wordcloud2

R interface to wordcloud for data visualization.
396 stars 107 forks source link

How to export a wordcloud2 output as an high-resolution image? #49

Open FV83 opened 6 years ago

FV83 commented 6 years ago

I have created a nice word cloud with wordcloud2 but the exported png file has a bad resolution when I print it (on a big A3 sheet) - same when I zoom in a bit too much on the screen. To save the output as an image, I used the "Export/save as image" in the Rstudio viewer. I also tried via saveWidget (save as html) and webshot (convert html to png) but the resolution is also low. I have tried with grDevices::png or grDevices::tiff, where you can control for the resolution, but I get a blank image (works with wordcloud but not wordcloud2). Is there another possibility I should try?

courageup commented 6 years ago

I had the same issue. Hope it could be fixed/enhanced soon.

ldlpdx commented 6 years ago

Having similar issues. Using a custom mask for mine, but I can get it to work within webshot only if I don't use the custom mask. With the custom mask, it's completely blank.

patkelly3189 commented 6 years ago

Having the same issue. Anyone come up with a solution? I'm trying to use this wordcloud as a figure in a publication, so unless I can get appropriate resolution it's a no-go.

xiaofan1991 commented 5 years ago

Having the same issue. First, I can't export vectorgram file such as eps, svg and emf. Second, words failed to fill in the custom mask.

imanojkumar commented 5 years ago

i think none is working to resolve this issue... Exporting WordCloud2 plot into high resolution png/jpg file (such as 1280x800 size)

krlmlr commented 4 years ago

Solved by #8?

alexhwang0919 commented 4 years ago

Going through the same problem in 2020. Could anyone please share if this issue has been resolved?

reblake commented 3 years ago

No, this issue hasn't been resolved. Even using the twitter mask and the demo data from the package, I can't export the image created in the RStudio plotting window. It is really frustrating. The code I tested with is here:

figPath2 <- system.file("examples/t.png", package = "wordcloud2")
tw <- wordcloud2(data = demoFreq, figPath = figPath2, color = "random-light", shuffle = FALSE)
tw
saveWidget(tw,"tmp.html", selfcontained = F)
webshot("tmp.html","test-cloud.pdf", delay = 5, vwidth = 480, vheight = 480)