2013-07-19 80 views
0

字體大小這是我的條形圖代碼:R上ggpolt2條形圖

ggplot(d, aes(x=column1, y =column2)) + geom_bar(position=position_dodge()) + 
     opts(panel.background = theme_rect(fill='white', colour='white')) 

column1 - 酒吧的名字。

如何讓名字的字體變大?

回答

2

要更改x軸標籤的大小,你應該使用axis.text.x=opts()(如果使用舊版本的ggplot2)或內部theme()(從0.9.1版本ggplot2開始)。

+opts(axis.text.x=theme_text(size=13)) 

+theme(axis.text.x=element_text(size=13))