1import matplotlib.pyplot as plt
2matplotlib.pyplot.subplots_adjust(wspace=X, hspace=Y)
3# Adjust X for width between subplots
4# Adjust Y for height between subplots
1import matplotlib.pyplot as plt
2
3fig, axes = plt.subplots(nrows=4, ncols=4)
4fig.tight_layout() # Or equivalently, "plt.tight_layout()"
5
6plt.show()