mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Add figsize parameter to plot methods
This commit is contained in:
parent
b0c30454b6
commit
b77f85ffd8
1 changed files with 6 additions and 2 deletions
|
|
@ -1498,7 +1498,7 @@ class Prophet(object):
|
||||||
return pd.DataFrame({'ds': dates})
|
return pd.DataFrame({'ds': dates})
|
||||||
|
|
||||||
def plot(self, fcst, ax=None, uncertainty=True, plot_cap=True, xlabel='ds',
|
def plot(self, fcst, ax=None, uncertainty=True, plot_cap=True, xlabel='ds',
|
||||||
ylabel='y'):
|
ylabel='y', figsize=(10, 6)):
|
||||||
"""Plot the Prophet forecast.
|
"""Plot the Prophet forecast.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
|
@ -1510,6 +1510,7 @@ class Prophet(object):
|
||||||
in the figure, if available.
|
in the figure, if available.
|
||||||
xlabel: Optional label name on X-axis
|
xlabel: Optional label name on X-axis
|
||||||
ylabel: Optional label name on Y-axis
|
ylabel: Optional label name on Y-axis
|
||||||
|
figsize: Optional tuple width, height in inches.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
|
|
@ -1518,10 +1519,11 @@ class Prophet(object):
|
||||||
return plot(
|
return plot(
|
||||||
m=self, fcst=fcst, ax=ax, uncertainty=uncertainty,
|
m=self, fcst=fcst, ax=ax, uncertainty=uncertainty,
|
||||||
plot_cap=plot_cap, xlabel=xlabel, ylabel=ylabel,
|
plot_cap=plot_cap, xlabel=xlabel, ylabel=ylabel,
|
||||||
|
figsize=figsize
|
||||||
)
|
)
|
||||||
|
|
||||||
def plot_components(self, fcst, uncertainty=True, plot_cap=True,
|
def plot_components(self, fcst, uncertainty=True, plot_cap=True,
|
||||||
weekly_start=0, yearly_start=0):
|
weekly_start=0, yearly_start=0, figsize=None):
|
||||||
"""Plot the Prophet forecast components.
|
"""Plot the Prophet forecast components.
|
||||||
|
|
||||||
Will plot whichever are available of: trend, holidays, weekly
|
Will plot whichever are available of: trend, holidays, weekly
|
||||||
|
|
@ -1539,6 +1541,7 @@ class Prophet(object):
|
||||||
yearly_start: Optional int specifying the start day of the yearly
|
yearly_start: Optional int specifying the start day of the yearly
|
||||||
seasonality plot. 0 (default) starts the year on Jan 1. 1 shifts
|
seasonality plot. 0 (default) starts the year on Jan 1. 1 shifts
|
||||||
by 1 day to Jan 2, and so on.
|
by 1 day to Jan 2, and so on.
|
||||||
|
figsize: Optional tuple width, height in inches.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
|
|
@ -1547,4 +1550,5 @@ class Prophet(object):
|
||||||
return plot_components(
|
return plot_components(
|
||||||
m=self, fcst=fcst, uncertainty=uncertainty, plot_cap=plot_cap,
|
m=self, fcst=fcst, uncertainty=uncertainty, plot_cap=plot_cap,
|
||||||
weekly_start=weekly_start, yearly_start=yearly_start,
|
weekly_start=weekly_start, yearly_start=yearly_start,
|
||||||
|
figsize=figsize
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue