import matplotlib.pyplot as plt from matplotlib import cm from mayavi import mlab import numpy as np a=np.loadtxt("dipool_pot.out") b=np.loadtxt("dipool_elektr.out") nx,ny=np.shape(a) print (nx,ny) X = np.arange(0,nx-1) Y = np.arange(0,ny-1) X, Y = np.meshgrid(X, Y) Z = a[X,Y] Z1 = b[X,Y] fig1=mlab.figure() mlab.mesh(X,Y,Z) fig2=mlab.figure() mlab.mesh(X,Y,Z1) mlab.show()