opts(panel.grid.minor = theme_blank(), panel.grid.major = theme_blank(), panel.background = theme_blank())
Example:
s = seq(-2*pi, 2*pi, length.out = 1000)
dat = data.frame(x = s)
ggplot(dat) +
geom_line(aes(x = x, y = sin(1*x)), size = 2, color = "red") +
geom_line(aes(x = x, y = sin(1.1*x)), size = 2, color = "red", linetype="dashed") +
opts(
panel.grid.minor = theme_blank(),
panel.grid.major = theme_blank(),
panel.background = theme_blank()
)