Open hxhc opened 7 years ago
good question,my jupyter has another problem with wordcloud2 "Warning message in readChar(htmlfile, file.info(htmlfile)$size): "在non-UTF-8 MBCS语言环境里只能读取字节"" a warning but no output. at the same time, give a star to my teacher lang! ——liuqian
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)
WordCloud2 is a fancy job, but I wonder if it could be displayed right in a jupyter notebook. I tried a simple way but failed.