如何在ggplot2中为theme_bw()设置较暗的网格线?

时间:2014-07-09 17:07:16

标签: r ggplot2

如何在ggplot2中为theme_bw()获得稍暗的网格线?

我已经看到了一些答案,但大多数使用theme()过于复杂。

有更简单的方法吗?

corr.plot.contour(data=foo1,x='log(area)',y='log(fd)',xl='Basa(log)',yl='Flo'+stat_smooth(method="lm",formula=y~x)+theme_bw()+ggsave("xyz.png")

enter image description here

1 个答案:

答案 0 :(得分:10)

来自beetroot's comments

corr.plot.contour(data = foo1, x = 'log(area)', y = 'log(fd)', 
                              xl = 'Basa(log)', yl = 'Flo' + 
stat_smooth(method = "lm", formula = y~x) + 
theme_bw() + 
theme(panel.grid.major = element_line(colour = "#808080")) + 
    ggsave("xyz.png")