Statsmodels Vector Autoregession - Plots Overalapping

Statsmodels Vector Autoregession - Plots Overalapping

我正在使用来自 statsmodels 的向量自回归: https://www.statsmodels.org/devel/vector_ar.html

当我调用results.plot()时,我的子图重叠了,有人可以提供解决方案吗?

可能数据太多,无法很好地适合绘图,但请尝试一下。

调用results.plot()成图再调用.tight_layout()

所以:

...#other code to get your model fit
fig = results.plot()
fig.tight_layout()
fig

这应该让 matplotlib 找出使一切都合适的最佳方法。