2017-04-17 202 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上找到很多例子。