Statsmodels矢量自动回归-绘制过度重叠

时间:2018-10-27 08:20:14

标签: matplotlib statsmodels

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

当我致电results.plot()时,我的子图重叠了,有人可以提供解决方案吗? the annoying overlapping pic

1 个答案:

答案 0 :(得分:0)

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

results.plot()调用到图形中,然后调用.tight_layout()

如此:

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

这应该让matplotlib找出使其完全适合的最佳方法。