x = np.arange(100).reshape(10, 10)
y = np.zeros((10, 10))
y[4:6, 1:8] = 1
y = np.ma.masked_where(y == 0, y)
plt.imshow(x, cmap=mpl.cm.bone)
plt.imshow(y, cmap=mpl.cm.jet_r, interpolation='nearest')
plt.show()
Имоверлей в питоне