mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Adding docstrings to new plotting methods.
This commit is contained in:
parent
13fc5c8ae4
commit
597fce143f
1 changed files with 53 additions and 1 deletions
|
|
@ -664,7 +664,20 @@ class Prophet(object):
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
return artists
|
return artists
|
||||||
|
|
||||||
def plot_trend(self, fcst, ax=None, uncertainty=True, **plotargs):
|
def plot_trend(self, fcst, ax=None, uncertainty=True):
|
||||||
|
"""Plot the trend component of the forecast.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
fcst: pd.DataFrame output of self.predict.
|
||||||
|
ax: Optional matplotlib Axes to plot on.
|
||||||
|
uncertainty: Optional boolean to plot uncertainty intervals.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
a list of matplotlib artists
|
||||||
|
"""
|
||||||
|
|
||||||
artists = []
|
artists = []
|
||||||
if not ax:
|
if not ax:
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
|
|
@ -683,6 +696,19 @@ class Prophet(object):
|
||||||
return artists
|
return artists
|
||||||
|
|
||||||
def plot_holidays(self, fcst, ax=None, uncertainty=True):
|
def plot_holidays(self, fcst, ax=None, uncertainty=True):
|
||||||
|
"""Plot the holidays component of the forecast.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
fcst: pd.DataFrame output of self.predict.
|
||||||
|
ax: Optional matplotlib Axes to plot on. One will be created if this
|
||||||
|
is not provided.
|
||||||
|
uncertainty: Optional boolean to plot uncertainty intervals.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
a list of matplotlib artists
|
||||||
|
"""
|
||||||
artists = []
|
artists = []
|
||||||
if not ax:
|
if not ax:
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
|
|
@ -706,6 +732,19 @@ class Prophet(object):
|
||||||
return artists
|
return artists
|
||||||
|
|
||||||
def plot_weekly(self, fcst, ax=None, uncertainty=True):
|
def plot_weekly(self, fcst, ax=None, uncertainty=True):
|
||||||
|
"""Plot the weekly component of the forecast.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
fcst: pd.DataFrame output of self.predict.
|
||||||
|
ax: Optional matplotlib Axes to plot on. One will be created if this
|
||||||
|
is not provided.
|
||||||
|
uncertainty: Optional boolean to plot uncertainty intervals.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
a list of matplotlib artists
|
||||||
|
"""
|
||||||
artists = []
|
artists = []
|
||||||
if not ax:
|
if not ax:
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
|
|
@ -730,6 +769,19 @@ class Prophet(object):
|
||||||
return artists
|
return artists
|
||||||
|
|
||||||
def plot_yearly(self, fcst, ax=None, uncertainty=True):
|
def plot_yearly(self, fcst, ax=None, uncertainty=True):
|
||||||
|
"""Plot the yearly component of the forecast.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
fcst: pd.DataFrame output of self.predict.
|
||||||
|
ax: Optional matplotlib Axes to plot on. One will be created if
|
||||||
|
this is not provided.
|
||||||
|
uncertainty: Optional boolean to plot uncertainty intervals.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
a list of matplotlib artists
|
||||||
|
"""
|
||||||
artists = []
|
artists = []
|
||||||
if not ax:
|
if not ax:
|
||||||
ax = fig.add_subplot(npanel, 1, panel_num)
|
ax = fig.add_subplot(npanel, 1, panel_num)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue