#Add x and y axis to all facet_wrap
rm(list = ls())
library(ggplot2); library(grid)

ggplot(mtcars, aes(mpg, hp)) + 
  geom_point() + 
  facet_wrap(~carb) +
  theme(panel.grid = element_blank(),
        panel.background = element_rect(fill = "white", colour = "black"), 
        panel.border = element_rect(fill = NA, colour = "white"), 
        axis.line = element_line(),
        strip.background = element_blank(),
        panel.margin = unit(2, "lines"))
## Warning: `panel.margin` is deprecated. Please use `panel.spacing` property
## instead

ggplot(mtcars, aes(mpg, hp)) + 
  geom_point() + 
  facet_wrap(~carb) +
  theme_minimal() +
  annotate("segment", x=-Inf, xend=Inf, y=-Inf, yend=-Inf)+
  annotate("segment", x=-Inf, xend=-Inf, y=-Inf, yend=Inf)

#ref https://stackoverflow.com/questions/22116518/add-x-and-y-axis-to-all-facet-wrap