Home

Sunday, September 25, 2016

Python Matplotlib tight_plot() max() arg is an empty sequence

Python Matplotlib tight_plot() max() arg is an empty sequence

Solution:
Place the plt.tight_plot()  after the plt.subplot and before plt.show()

as follow

plt.figure()

plt.subplot(2,1,1)
...

plt.subplot(2,1,2)
...

plt.tight_layout()
plt.show()

No comments:

Post a Comment