From 541dc9a0b0e3c23ad794b207dc2e4ed763433977 Mon Sep 17 00:00:00 2001 From: Ben Letham Date: Sat, 15 Apr 2017 17:56:43 -0700 Subject: [PATCH] Update docstring for plot_components --- python/fbprophet/forecaster.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index 5113fbb..fead2e4 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -892,6 +892,13 @@ class Prophet(object): Will plot whichever are available of: trend, holidays, weekly seasonality, and yearly seasonality. + This method returns a list of matplotlib artists. To show the plot, + >>> m.plot_components(fcst) + >>> from matplotlib import pyplot as plt + >>> plt.show() + + To save the figure, replace plt.show with plt.savefig. + Parameters ---------- fcst: pd.DataFrame output of self.predict. @@ -907,7 +914,7 @@ class Prophet(object): Returns ------- - a matplotlib figure. + A list of matplotlib artists. """ # Identify components to be plotted components = [('trend', True),