mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Add plotly plot to quickstart example
This commit is contained in:
parent
ee14933b3f
commit
4e5e223e4f
2 changed files with 25656 additions and 32 deletions
File diff suppressed because one or more lines are too long
|
|
@ -503,7 +503,7 @@ def plot_cross_validation_metric(
|
||||||
|
|
||||||
|
|
||||||
def plot_plotly(m, fcst, uncertainty=True, plot_cap=True, trend=False, changepoints=False,
|
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.
|
"""Plot the Prophet forecast with Plotly offline.
|
||||||
|
|
||||||
Plotting in Jupyter Notebook requires initializing plotly.offline.init_notebook_mode():
|
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(
|
layout = dict(
|
||||||
showlegend=False,
|
showlegend=False,
|
||||||
|
width=figsize[0],
|
||||||
|
height=figsize[1],
|
||||||
yaxis=dict(
|
yaxis=dict(
|
||||||
title=ylabel
|
title=ylabel
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue