0
我正在处理一些推文并使用文本挖掘技术。如何增加Rstudio中TermDocumentMatrix图的字体大小?
我用下面的命令,由于字体太小,图不可读。我该如何解决它?
plot(tdm, term = freq.terms, corThreshold = 0.95, ps=30)
我正在处理一些推文并使用文本挖掘技术。如何增加Rstudio中TermDocumentMatrix图的字体大小?
我用下面的命令,由于字体太小,图不可读。我该如何解决它?
plot(tdm, term = freq.terms, corThreshold = 0.95, ps=30)
我不一定有你的数据,但这里是代码一起工作的通用线。关键在于属性“attrs”并将“字体大小”设置为适用于您的tdm的任何内容。随着corlimit和lowfreq的使用将有助于减少或增加节点和连接线的数量,这也会影响字体大小。我只是用你或你的客户想要的参数创建绘图,然后增加属性行中的字体。
corlimit <- 0.95
freq.term <- findFreqTerms(tdm,lowfreq=1000)
plot(tdm,main=title,term=freq.term, corThreshold=corlimit,
attrs=list(node=list(width=20,fontsize=74,fontcolor="blue",color="red")))