spacing figure matplotlib code example
Example 1: matplotlib add space between subplots
import matplotlib.pyplot as plt
fig, axes = plt.subplots(nrows=4, ncols=4)
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
plt.show()
Example 2: subplot adjust python
plt.subplots_adjust(wspace=0.5)