Browse Source

Adding docstrings to new plotting methods.

Isaac Laughlin 8 years ago
parent
commit
597fce143f
1 changed files with 53 additions and 1 deletions
  1. 53 1
      python/fbprophet/forecaster.py

+ 53 - 1
python/fbprophet/forecaster.py

@@ -664,7 +664,20 @@ class Prophet(object):
         fig.tight_layout()
         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 = []
         if not ax:
             ax = fig.add_subplot(111)
@@ -683,6 +696,19 @@ class Prophet(object):
         return artists
 
     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 = []
         if not ax:
             ax = fig.add_subplot(111)
@@ -706,6 +732,19 @@ class Prophet(object):
         return artists
 
     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 = []
         if not ax:
             ax = fig.add_subplot(111)
@@ -730,6 +769,19 @@ class Prophet(object):
         return artists
 
     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 = []
         if not ax:
             ax = fig.add_subplot(npanel, 1, panel_num)