plot.prophet.Rd 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/prophet.R
  3. \name{plot.prophet}
  4. \alias{plot.prophet}
  5. \title{Plot the prophet forecast.}
  6. \usage{
  7. \method{plot}{prophet}(x, fcst, uncertainty = TRUE, xlabel = "ds",
  8. ylabel = "y", ...)
  9. }
  10. \arguments{
  11. \item{x}{Prophet object.}
  12. \item{fcst}{Data frame returned by predict(m, df).}
  13. \item{uncertainty}{Boolean indicating if the uncertainty interval for yhat
  14. should be plotted. Must be present in fcst as yhat_lower and yhat_upper.}
  15. \item{xlabel}{Optional label for x-axis}
  16. \item{ylabel}{Optional label for y-axis}
  17. \item{...}{additional arguments}
  18. }
  19. \value{
  20. A ggplot2 plot.
  21. }
  22. \description{
  23. Plot the prophet forecast.
  24. }
  25. \examples{
  26. \dontrun{
  27. history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
  28. y = sin(1:366/200) + rnorm(366)/10)
  29. m <- prophet(history)
  30. future <- make_future_dataframe(m, periods = 365)
  31. forecast <- predict(m, future)
  32. plot(m, forecast)
  33. }
  34. }