【问题标题】:text wordcloud plotting error文本 wordcloud 绘图错误
【发布时间】:2015-03-14 22:07:08
【问题描述】:

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

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.

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

【问题讨论】:

  • 尝试使用较小的比例,例如scale = c(4, 0.2) 或更少的话:例如max.words = 30
  • 也许在 wordcloud 之前你 gsub() 将“健康保险”转换为“hlth ins”。所以它适合你想要的字数。
  • 非常感谢。小规模的工作。

标签: r word-cloud


【解决方案1】:

wordcloud2(dm) 可能会起作用。 你可以安装 wordcloud2 包和一个

【讨论】:

【解决方案2】:

你也可以试试plotting with a larger device,例如

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

查看链接以了解绘制特定尺寸的其他方法。

【讨论】:

    【解决方案3】:

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

    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())
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-01
      • 2020-04-14
      • 2018-05-11
      • 2015-04-25
      • 2016-04-25
      • 1970-01-01
      相关资源
      最近更新 更多