2012-09-24 156 views
14

下面是相关代码:更改轴的颜色标签

ggplot.3plus<-ggplot(summary.3plus, aes(x=sp1, y=fract.mean, fill=ForestAge)) + 
    geom_bar(position=position_dodge())+ coord_cartesian(ylim = c(1, 1.175))+ 
    geom_errorbar(aes(ymin=fract.mean-se, ymax=fract.mean+se), 
       width=.2,     # Width of the error bars 
       position=position_dodge(.9)) 

ggplot.3plus<- ggplot.3plus + theme(axis.title.x = element_text(colour = "red")) 

你可以看到,随着代码的最后一行,我可以改变轴标题的颜色,但不是轴的颜色标签。

回答