How to place divisions between facet grid lines

ggplot2, r

Solution

This should do:

last_plot() + theme_bw()

or

last_plot() + 
   opts(panel.background = theme_rect(fill = NA, color = "black"))

Since version 0.9.2, `opts` has been replaced by `theme`:

last_plot() + 
   theme(panel.background = element_rect(fill = NA, color = "black"))

Problem

I'm using ggplot with `facet_grid` to make a plot for publication. I'm not sure how the reviewers will react to the standard gray background with white grid lines and so I'm preparing with and without. However when I use `opts(panel.background = theme_blank())` the display lacks the between panes discrimination that the standard background gives. what is the easiest way to add the between pane grid back (not that it was there but it was white against gray) that looks similar to my desired outcome below? The Code ``` ggplot(CO2, aes(conc)) + geom_density() + facet_grid(Type~Treatment) + opts(panel.background = theme_blank()) ``` Current Outcome Desired Outcome Thank you in advance.

Original source