Lchiffon / wordcloud2

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

this package doesn't support Jupyter Notebook #30

Open babybear1992 opened 6 years ago

babybear1992 commented 6 years ago

Hi, hope this message finds you well. I tried to install and run wordcloud2 on Jupyter Notebook, however, it didn't show the results but a small white rectangle. Would you please check it out? Thank you!

Lchiffon commented 6 years ago

I don't usually use python nor Jupyter, so it may not be a urgent issue for me.

htmlwidgets, the framework fro wordcloud2 does not Jupyter Notebook, like this.

Hope next version for htmlwidgets could provide the function like plotly

MitzTD commented 2 years ago

I had success with the following code.

devtools::install_github("lchiffon/wordcloud2") install.packages("webshot")

library(wordcloud2) library(htmlwidgets) library(webshot) webshot::install_phantomjs() library(IRdisplay)

my_graph <- wordcloud2(demoFreq) my_html = "tmp.html" saveWidget(my_graph, my_html, selfcontained = FALSE) my_png = "wordcloud2.png" webshot(my_html, my_png, delay = 5) display_png(file = my_png)