相关疑难解决方法(0)

更改轴标签的颜色

这是相关的代码:

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"))
Run Code Online (Sandbox Code Playgroud)

您可以看到,使用最后一行代码,我可以更改轴标题的颜色,但不能更改轴LABELS的颜色.

r ggplot2 axis-labels

17
推荐指数
1
解决办法
2万
查看次数

标签 统计

axis-labels ×1

ggplot2 ×1

r ×1