Return a geom_rect() that identifies recessions for a given time series plot

geom_recession(
  data = NULL,
  stat = "identity",
  position = "identity",
  ...,
  alpha = 0.2,
  fill = "dodgerblue3",
  show.legend = NA,
  inherit.aes = TRUE
)

Arguments

data

Data frame

alpha

Numeric transparency parameter. Default = 0.2.

fill

String identifying the fill color, default is "dodgerblue3"

Value

A geom_rect() that can be added to a ggplot time series plot