From f89de329bf69b39b4692cfcbbd9a40a7619d168e Mon Sep 17 00:00:00 2001 From: Tom Peachey <77214385+tomthepeach@users.noreply.github.com> Date: Sat, 18 May 2024 11:17:18 +0000 Subject: [PATCH] Removed depreciated/unnecessary datetime conversion (#2523) --- python/prophet/plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/prophet/plot.py b/python/prophet/plot.py index f6e618a31..5527fa08d 100644 --- a/python/prophet/plot.py +++ b/python/prophet/plot.py @@ -69,8 +69,8 @@ def plot( ax = fig.add_subplot(111) else: fig = ax.get_figure() - fcst_t = fcst['ds'].dt.to_pydatetime() - ax.plot(m.history['ds'].dt.to_pydatetime(), m.history['y'], 'k.', + fcst_t = fcst['ds'] + ax.plot(m.history['ds'], m.history['y'], 'k.', label='Observed data points') ax.plot(fcst_t, fcst['yhat'], ls='-', c='#0072B2', label='Forecast') if 'cap' in fcst and plot_cap: