From 4b859bca0152c1b3001e19fa00d65a27e51716e6 Mon Sep 17 00:00:00 2001 From: Greg Rafferty Date: Mon, 10 May 2021 16:04:34 -0700 Subject: [PATCH] added argument for point color to cv plot (#1895) --- python/prophet/plot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/prophet/plot.py b/python/prophet/plot.py index cb923ca..fbd98a9 100644 --- a/python/prophet/plot.py +++ b/python/prophet/plot.py @@ -473,7 +473,8 @@ def add_changepoints_to_plot( def plot_cross_validation_metric( - df_cv, metric, rolling_window=0.1, ax=None, figsize=(10, 6), color='b' + df_cv, metric, rolling_window=0.1, ax=None, figsize=(10, 6), color='b', + point_color='gray' ): """Plot a performance metric vs. forecast horizon from cross validation. @@ -543,7 +544,7 @@ def plot_cross_validation_metric( x_plt = df_none['horizon'].astype('timedelta64[ns]').astype(np.int64) / float(dt_conversions[i]) x_plt_h = df_h['horizon'].astype('timedelta64[ns]').astype(np.int64) / float(dt_conversions[i]) - ax.plot(x_plt, df_none[metric], '.', alpha=0.1, c=color) + ax.plot(x_plt, df_none[metric], '.', alpha=0.1, c=point_color) ax.plot(x_plt_h, df_h[metric], '-', c=color) ax.grid(True)