text wordcloud plotting error

拈花ヽ惹草 提交于 2019-12-21 04:42:38

问题


I have the following code for plotting a word cloud, and am getting the subsequent error.

wordcloud(dm$word, dm$freq, scale=c(8,.2),min.freq=2,
+           max.words=Inf, random.order=FALSE, rot.per=.15, colors=rainbow

>Warning message:
In wordcloud(dm$word, dm$freq, scale = c(8, 0.2), min.freq = 2,:health insurance could not be fit on page. It will not be plotted. Unable to view plot.

I do not understand why this is happening. Please help.


回答1:


Try with smaller scale, for example:

wordcloud(Election2016Corpus, max.words =100,min.freq=3,scale=c(4,.5), 
           random.order = FALSE,rot.per=.5,vfont=c("sans serif","plain"),colors=palette())



回答2:


You may also try plotting with a larger device, for example

dev.new(width = 1000, height = 1000, unit = "px")
wordcloud(...)

see the link for other ways to plot a certain size.




回答3:


wordcloud2(dm) might work. you can install wordcloud2 package and just one



来源:https://stackoverflow.com/questions/27981651/text-wordcloud-plotting-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!