You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error
Using neuralprophet > 0.5.4, when attempting to print plots using matplotlib we get an error:
AttributeError: 'None' object has no attribute 'canvas'
Prerequisites
Describe the bug
Error
Using neuralprophet > 0.5.4, when attempting to print plots using matplotlib we get an error:
AttributeError: 'None' object has no attribute 'canvas'
This is caused when this line was changed:
https://github.com/ourownstory/neural_prophet/blame/main/neuralprophet/plot_model_parameters_matplotlib.py#L140C15-L140C29
in e27b5b0
fig = fig.tight_layout()
The method tight_layout of matplotlib does not do any return at all. See https://github.com/matplotlib/matplotlib/blob/v3.5.x/lib/matplotlib/figure.py#L3201
To Reproduce
model.set_plotting_backend("matplotlib")
forecast_figure = model.plot(forecast)
Expected behavior
The plots are generated in matplotlib
What actually happens
The call:
fig = fig.tight_layout()
Returns fig = None
The text was updated successfully, but these errors were encountered: