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(rect=[0, 0.03, 1, 0.95]) # Or equivalently, "plt.tight_layout()"
5
6plt.show()
1left = 0.125 # the left side of the subplots of the figure
2right = 0.9 # the right side of the subplots of the figure
3bottom = 0.1 # the bottom of the subplots of the figure
4top = 0.9 # the top of the subplots of the figure
5wspace = 0.2 # the amount of width reserved for blank space between subplots
6hspace = 0.2 # the amount of height reserved for white space between subplots