facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.53k stars 4.54k forks source link

Plot doesn't work on WIN & Spyder IDE #2620

Open torsten156 opened 2 months ago

torsten156 commented 2 months ago

Hi,

I'm using Spyder as IDE and try this quick example. The code works fine, but I can't plot the forecast or parameters. I don't get an error after the plot command. Here my example code:

import pandas as pd
from neuralprophet import NeuralProphet, set_log_level
import matplotlib.pyplot as plt

df = pd.read_csv("https://github.com/ourownstory/neuralprophet-data/raw/main/kaggle-energy/datasets/tutorial01.csv")
set_log_level("ERROR")

m = NeuralProphet()

metrics = m.fit(df)

df_future = m.make_future_dataframe(df, n_historic_predictions=True, periods=365)

forecast = m.predict(df_future)

plt = m.plot(forecast)
plt.show()
plt = m.plot_components(forecast)
plt.show()

I'm using matplotlib.pyplot because it was the fix in an other post. But it doesn't work :-(

What can I do here???

Thanks Torsten