ggplot2で中が塗りつぶされていない長方形を描く

使うたびにはまる系なのでめもる&答えはgeom_rect()でfill=NAとする。

library("ggplot2")
ggplot(mtcars, aes(qsec, mpg)) +
  geom_point()+
  geom_rect(aes(xmin=18, xmax=20, ymin=21, ymax=23), fill=NA, color="red")