text wordcloud plotting error

2019-04-07 00:14发布

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.

标签: r word-cloud
2条回答
时光不老,我们不散
2楼-- · 2019-04-07 00:47

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楼-- · 2019-04-07 00:55

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())
查看更多
登录 后发表回答