Esempio n. 1
0
nz = 60

# Import Array

# electrostatics information
data = numpy.loadtxt(field)

row1 = data[:,3]


# Adjust the shape of the data
plotdata = row1.reshape((nx,ny))


src1 = ArraySource(transpose_input_array=True)
src1.name = u'Daten'
src1.scalar_data = plotdata
mayavi.add_source(src1)

# ------------------------------------------- 
#array_source = engine.scenes[0].children[0]
#engine.add_filter(<enthought.mayavi.modules.iso_surface.IsoSurface object at 0xa1a8059c>, array_source)
# ------------------------------------------- 
#from enthought.mayavi.tools.show import show
#show()

iso_surface = IsoSurface()
array_source = engine.scenes[0].children[0]
engine.add_filter(iso_surface, array_source)

iso_surface = engine.scenes[0].children[0].children[0].children[0]