13

我有以下用于绘制词云的代码,并且收到了后续错误。

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.

我不明白为什么会这样。请帮忙。

4

3 回答 3

13

尝试使用较小的规模,例如:

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())
于 2016-06-10T13:42:41.060 回答
5

您也可以尝试使用更大的设备进行绘图,例如

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

有关绘制特定大小的其他方法,请参阅链接。

于 2018-12-06T23:56:33.633 回答
1

wordcloud2(dm)可能会奏效。你可以安装 wordcloud2 包,只有一个

于 2019-04-15T01:12:37.133 回答