plot.prophet.Rd 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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, plot_cap = TRUE,
  8. xlabel = "ds", 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{plot_cap}{Boolean indicating if the capacity should be shown in the
  16. figure, if available.}
  17. \item{xlabel}{Optional label for x-axis}
  18. \item{ylabel}{Optional label for y-axis}
  19. \item{...}{additional arguments}
  20. }
  21. \value{
  22. A ggplot2 plot.
  23. }
  24. \description{
  25. Plot the prophet forecast.
  26. }
  27. \examples{
  28. \dontrun{
  29. history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
  30. y = sin(1:366/200) + rnorm(366)/10)
  31. m <- prophet(history)
  32. future <- make_future_dataframe(m, periods = 365)
  33. forecast <- predict(m, future)
  34. plot(m, forecast)
  35. }
  36. }