zi = np.ones((3, 3))
try:
    CS = plt.contour(xi, yi, zi, 15, linewidths=0.5, colors='k')
except ValueError:
    pass
CS = plt.contourf(xi, yi, zi, 15, cmap=plt.cm.jet)
plt.colorbar()
plt.show()
Matplotlib - Contour plot with single value