Browse Source

Update docstring for plot_components

Ben Letham 8 năm trước cách đây
mục cha
commit
541dc9a0b0
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      python/fbprophet/forecaster.py

+ 8 - 1
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),