for i in range(xx.shape[0]):
    for j in range(xx.shape[1]):
        zz[i, j] = func(xx[i, j], yy[i, j])
pylab.pcolor(xx, yy, zz)
pylab.colorbar()
pylab.show()
How to plot 3D function as 2D colormap in python?