Add plotly plot to quickstart example

This commit is contained in:
Ben Letham 2019-05-06 16:15:23 -07:00
parent ee14933b3f
commit 4e5e223e4f
2 changed files with 25656 additions and 32 deletions

File diff suppressed because one or more lines are too long

View file

@ -503,7 +503,7 @@ def plot_cross_validation_metric(
def plot_plotly(m, fcst, uncertainty=True, plot_cap=True, trend=False, changepoints=False,
changepoints_threshold=0.01, xlabel='ds', ylabel='y'):
changepoints_threshold=0.01, xlabel='ds', ylabel='y', figsize=(900, 600)):
"""Plot the Prophet forecast with Plotly offline.
Plotting in Jupyter Notebook requires initializing plotly.offline.init_notebook_mode():
@ -620,6 +620,8 @@ def plot_plotly(m, fcst, uncertainty=True, plot_cap=True, trend=False, changepoi
layout = dict(
showlegend=False,
width=figsize[0],
height=figsize[1],
yaxis=dict(
title=ylabel
),