Learn R Programming

prophet (version 0.1)

plot.prophet: Plot the prophet forecast.

Description

Plot the prophet forecast.

Usage

"plot"(x, fcst, uncertainty = TRUE, ...)

Arguments

x
Prophet object.
fcst
Data frame returned by predict(m, df).
uncertainty
Boolean indicating if the uncertainty interval for yhat should be plotted. Must be present in fcst as yhat_lower and yhat_upper.
...
additional arguments

Value

A ggplot2 plot.

Examples

Run this code
## Not run: 
# history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
#                       y = sin(1:366/200) + rnorm(366)/10)
# m <- prophet(history)
# future <- make_future_dataframe(m, periods = 365)
# forecast <- predict(m, future)
# plot(m, forecast)
# ## End(Not run)

Run the code above in your browser using DataLab