If you don't want to change the spacing globally (by editing your rcParams), and want a cleaner approach, try this:
ax.tick_params(axis='both', which='major', pad=15)
or for just x axis
ax.tick_params(axis='x', which='major', pad=15)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…