Skip to content

Commit

Permalink
Reorder plots
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulfatir authored Mar 12, 2024
1 parent 1a7bb17 commit 01f3b9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ forecast = pipeline.predict(context, prediction_length) # shape [num_series, nu
forecast_index = range(len(df), len(df) + prediction_length)
low, median, high = np.quantile(forecast[0].numpy(), [0.1, 0.5, 0.9], axis=0)

plt.figure(figsize=(8, 4))
plt.plot(df["#Passengers"], color="royalblue", label="historical data")
plt.fill_between(forecast_index, low, high, color="tomato", alpha=0.3, label="80% prediction interval")
plt.plot(forecast_index, median, color="tomato", label="median forecast")
plt.fill_between(forecast_index, low, high, color="tomato", alpha=0.3, label="80% prediction interval")
plt.legend()
plt.grid()
plt.show()
Expand Down

0 comments on commit 01f3b9f

Please sign in to comment.