import numpy as np import matplotlib.pyplot as plt a=np.loadtxt('electr.dat') fig = plt.figure() ax = fig.add_subplot() ax.plot_surface(a) pl.show()