matplotlib subplot spacing 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()
plt.show()
Example 2: python subplot space between plots
import matplotlib.pyplot as plt
fig, axes = plt.subplots(nrows=4, ncols=4)
fig.tight_layout(rect=[0, 0.03, 1, 0.95])
plt.show()
Example 3: how to increase distance between subplot matplot lib
left = 0.125
right = 0.9
bottom = 0.1
top = 0.9
wspace = 0.2
hspace = 0.2