我认为更好的方法是使用Clip_on=假选项长方形 https://matplotlib.org/devdocs/api/_as_gen/matplotlib.patches.Rectangle.html:
import random
import matplotlib.pyplot as pyplot
x = random.sample(range(50), 50)
y= random.sample(range(50), 50)
fig = pyplot.figure()
ax = pyplot.subplot(111)
ax.scatter(x,y,label='a')
ax.set_aspect('equal')
ax.set_xlim(0,60)
ax.set_ylim(0,60)
ax.plot([0,60], [0, 60], color='k', linestyle='-', linewidth=1.25)
ax.add_patch(pyplot.Rectangle((0,60),60, 10,facecolor='silver',
clip_on=False,linewidth = 0))
TITLE = ax.text(26,61, r'$\mathregular{Title}$',fontsize = 14,zorder = 5,
color = 'k')
pyplot.show()
这会产生一个在轴之外绘制的矩形,而不必求助于额外的空间: