2

I'm plotting all my graphs with theme_bw() in ggplot2, and now i'd like to apply the same (or similar) theme to a ggpairs plot of GGally. I tried it this way, but this seems to have no effect:

p <- ggpairs(vars, columns=1:ncol(vars), lower=list(params=c(alpha = 0.5, theme(panel.background = element_blank()))))

Is there a way to apply a ggplot2-theme to a ggpairs plot ?

zx8754
  • 52,746
  • 12
  • 114
  • 209
ruben baetens
  • 2,806
  • 6
  • 25
  • 31

1 Answers1

1

I'm not sure if I understood you problem very well. Have you already tried the following simple solution? I used the iris dataset for the example. This solution is applied only to non data elements (not applied to geoms).

      ggpairs(iris, mapping = aes(color = Species)) + 
      theme_bw()
Kirk
  • 146
  • 2
  • 3