Very similar to this question but with the difference that my figure can be as large as it needs to be.
I need to generate a whole bunch of vertically-stacked plots
Try using plt.tight_layout
As a quick example:
import matplotlib.pyplot as plt fig, axes = plt.subplots(nrows=4, ncols=4) fig.tight_layout() # Or equivalently, "plt.tight_layout()" plt.show()
Without Tight Layout
With Tight Layout