Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locally exporting the wordclouds to png or svg format #8

Closed
DominiqueMakowski opened this issue Oct 3, 2016 · 3 comments
Closed

Locally exporting the wordclouds to png or svg format #8

DominiqueMakowski opened this issue Oct 3, 2016 · 3 comments

Comments

@DominiqueMakowski
Copy link

Thank for your impressive work,

Do you know if there is any possibility to nicely save the cloud in png or svg format? Being able to change the resolution and such would be really nice :)

Cheers

@Lchiffon
Copy link
Owner

Lchiffon commented Oct 8, 2016

Currently, wordcloud2 can be exported by Rstudio:

Use the Export -> Save As Image menu within the RStudio Viewer (this
will let the user export a PNG of whatever size they need).

I'm still looking for a good method for exporting from R codes.

@Lchiffon
Copy link
Owner

I'll write a new function to solve exporting. You can try it like this:

install.packages("webshot")
webshot::install_phantomjs()
library(wordcloud2)
hw = wordcloud2(demoFreq,size = 3)
saveWidget(hw,"1.html",selfcontained = F)
webshot::webshot("1.html","1.png",vwidth = 1992, vheight = 1744, delay =10)

@badbye
Copy link

badbye commented Oct 24, 2016

Save canvas to SVG: http://jsfiddle.net/pfp9y5xp/, hope it can be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants