% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-ml.R
\name{geom_forecast_band}
\alias{geom_forecast_band}
\title{Time-series forecast with confidence bands}
\usage{
geom_forecast_band(mapping = NULL, data = NULL, color = NULL, linewidth = NULL)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map time to \code{x}, the value
to \code{y}, the interval to \code{ymin}/\code{ymax}, and the
actual-vs-forecast split to \code{group}.}

\item{color}{Line color.}

\item{linewidth}{Line width.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
Historical actuals as a solid line, the forecast dashed, and one or two
nested confidence ribbons.
}
\examples{
d <- data.frame(
  t = 1:10, v = c(1:6, 7, 8, 9, 10),
  lo = c(rep(NA, 6), 6, 6.5, 7, 7.5),
  hi = c(rep(NA, 6), 8, 9.5, 11, 12.5),
  part = rep(c("actual", "forecast"), c(6, 4))
)
ggnext(d, aes(t, v, ymin = lo, ymax = hi, group = part)) +
  geom_forecast_band()
}
