【问题标题】:Increase font size in R plot增加 R 图中的字体大小
【发布时间】:2016-10-05 19:42:50
【问题描述】:

我正在从TermDocumentMatrix 绘制所有单词之间的相关性。但是字的字体太小了,我看不懂。

freq.terms <- findFreqTerms(tdm, lowfreq=8)
plot(tdm, term = freq.terms, corThreshold = 0.2, weighting = T)

我在其他帖子中提到的情节调用中尝试了cex=1.5,但这没有任何作用。

如何增加字体大小?

【问题讨论】:

  • 请提供一个可重现的例子。
  • 你试过x11(pointsize = 14) - 默认是12

标签: r plot font-size


【解决方案1】:

使用tm 时会有些不同,因此没有cex

plot(dtm,terms = findFreqTerms(dtm, lowfreq=100),corThreshold = 0.3,weighting = TRUE,attrs = list(graph = list(rankdir ="BT"),node = list(shape = "rectangle",fixedsize=FALSE,fontsize=120)))

其中的关键部分是 fontsize=120(或 = 其他) 在

node = list(shape = "rectangle",fixedsize=FALSE,fontsize=120)

【讨论】:

    猜你喜欢
    • 2021-06-24
    • 2011-05-13
    • 2019-11-25
    • 1970-01-01
    • 2013-12-22
    • 1970-01-01
    • 2010-12-04
    相关资源
    最近更新 更多