y = np.arange(-3.0, 3.0, delta)
X, Y = np.meshgrid(x, y)
sigma = 1.0
Z = mlab.bivariate_normal(X, Y, sigma, sigma, 0.0, 0.0)
z1 = mlab.bivariate_normal(0, 1 * sigma, sigma, sigma, 0.0, 0.0)
z2 = mlab.bivariate_normal(0, 2 * sigma, sigma, sigma, 0.0, 0.0)
z3 = mlab.bivariate_normal(0, 3 * sigma, sigma, sigma, 0.0, 0.0)
plt.figure()
im = plt.imshow(Z, interpolation='bilinear', origin='lower', extent=(-50, 
    50, -50, 50), cmap=cm.gray)
CS = plt.contour(Z, [z1, z2, z3], origin='lower', extent=(-50, 50, -50, 50),
    colors='red')
plt.savefig('fig.png')
plt.show()
python matplotlib — контурный график — доверительные интервалы