Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I have darker gridlines for theme_bw() in ggplot2?

Tags:

r

ggplot2

How can I get slightly darker gridlines for theme_bw() in ggplot2?

I have seen some some answers, but most are too complicated using theme().

Is there a easier way?

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

like image 316
Geekuna Matata Avatar asked Jul 09 '14 17:07

Geekuna Matata


Video Answer


1 Answers

From 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")
like image 54
Geekuna Matata Avatar answered Sep 19 '22 12:09

Geekuna Matata