It seems that this question first appeared around 2007.
The question is this:
How to change the gridline and background color when plotting with ggplot2 in R? I add two pictures as an example of what I mean by background and gridline color.
Back in 2007, Hadley Wickham said that appearance functionalities were missing (this included changing the color of the background). Does anybody know if there’s an update that allows changing the background color and the color of the gridlines?
Thanks in advance


Note: Since version 0.9.2 this is done using
theme:Additionally, there are
panel.grid.majorandpanel.grid.minoroptions. See here for a full list of options and some examples. There is also documentation at?theme.In older version of ggplot2 this was done via:
You can also switch to more traditional theme using
theme_bw().You can also find information on themes and opts() on this SO thread.