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.07k stars 4.49k forks source link

Should not call `fig.tight_layout()` unconditionally #2257

Open davidgilbertson opened 1 year ago

davidgilbertson commented 1 year ago

I'm calling plot() on a model and passing in an ax, which is then used to plot the function.

This ax exists in a figure that is using constrained layout, rather than tight layout.

The issue is that the Prophet plot function calls fig.tight_layout() on this line.

I think it should either:

In fact, the internals of tight_layout()/subplots_adjust() does indeed check for the use of constrained layout and logs a warning, but this warning gets swallowed somewhere.

My workaround in the meantime is to just reset back to the rcParams values with:

m.plot(forecast, ax=ax).set_constrained_layout(None)
pranith7 commented 1 year ago

@tcuongd i want to work on this issue

adit299 commented 1 year ago

@pranith7 Did you make any progress on this issue? I would like to take a look.

alhridoy commented 9 months ago

Hi @tcuongd I created a PR addressing this issue. Would you please check that.

sivapungamuru commented 9 months ago

nice thank you

richardtorres314 commented 2 months ago

@tcuongd Would #2504 merged consider this closed? Thank you!