python - how to 3dplot 3 colum data via mlab.surf -
data this:
x,y,z 1.1,2.2,3.3 5.5,1.45,6.77 below code can plot plane
import numpy np enthought.mayavi import mlab x,y,zs =np.loadtxt('test',delimiter=',',usecols=(0,1,2),unpack=true,skiprows=1) z = np.zeros((len(x), len(x))) xi in np.arange(len(x)): z[xi, xi] = zs[xi] pl = mlab.surf(x, y, z, warp_scale="auto") mlab.axes(xlabel='x', ylabel='y', zlabel='z') mlab.outline(pl) this effect forward to: http://philipp.spitzer.priv.at/notes/attachment/wiki/pythonplotting/pythonplottingsurf.png
it seems work ok me:

is not expecting?
Comments
Post a Comment