title: trouble combining geom_rect and facet_grid in ggplot
body: <p>I want to shade part of the background in each facet of a simple plot.  If I omit faceting and run geom_rect + geom_point, the expected results appear as shown in the MRE below.  If I omit the rectangle and run geom_point + facet_grid, the expected 4 panels have each point in the correct facet.  But when I combine geom_rect + geom_point + and facet_grid, the points in the first category and only those get plotted in every facet.  What is going on please???</p>
  <pre><code>library(ggplot2)
  set.seed(42)
  syn.dat &lt;- data.frame(
     category.1 = as.factor(rep(c(&quot;1A&quot;, &quot;1B&quot;), each = 8)),
     category.2 = as.factor(rep(rep(c(&quot;2A&quot;, &quot;2B&quot;), times = 2), each = 4)),
     x = rep(-1:2, each = 4) + runif(8, max = .4),
     y = rep(-1:2, each = 4) + runif(8, max = .4))
  
  ggplot() +
     geom_rect(aes(xmin = -Inf, xmax = Inf, ymin = .5, 
        ymax = Inf), fill = &quot;lightyellow&quot;) +
     geom_point(data = syn.dat, aes(x = x, y = y)) +
     facet_grid(cols = vars(category.1), 
        rows = vars(category.2))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Bj8GJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bj8GJ.png" alt="Works without facets" /></a></p>
  <p><a href="https://i.stack.imgur.com/EjVMR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EjVMR.png" alt="Works without rectangle" /></a></p>
  <p><a href="https://i.stack.imgur.com/dwNYf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dwNYf.png" alt="Fails with both" /></a></p>