Plot doesn't work on WIN & Spyder IDE

Open
#2,620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Reproduce the supplied script in Windows Spyder, starting with m.plot and m.plot_components and their plt.show() calls. Compare the behavior with the same example outside Spyder and inspect these plotting entry points for a reproducible difference; done means the forecast and components render or the issue is narrowed to an environment limitation.

Written by the indexing model from the issue text.

Description

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

Dominant language
Python
Stars
20.5k
Forks
4.6k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebook/prophet

All issues in facebook/prophet

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.