2017-04-17 90 views
3

标题是超自我解释:我想改变字体(文本类型,粗体)的wordcloud包河更改字体

+0

另请参阅此TT相关的SE问题字体:http://stackoverflow.com/questions/18108512/r-wordcloud-external-ttf-vfont-not-recognized – patrickmdnet

回答

4

使用familyfont论点:

library(wordcloud) 
set.seed(1) 
par(mfrow = c(1,2)) 
wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62), family = "serif", font = 3) 
wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62), family = "mono", font = 2) 

enter image description here

?parfont下和family了解详情。 extrafont包提供了更多选项。你在SO上找到很多例子。