From a hint here
import scipy
x = scipy.arange(-7., 7.05, 0.1)
y = scipy.arange(-5., 5.05, 0.1)
[X,Y] = scipy.meshgrid(x,y)
Z = 3.0*scipy.sin(X*Y+1e-4)/(X*Y+1e-4)
from enthought.tvtk.tools import mlab
fig = mlab.figure(browser = False)
s = mlab.Surf(X, Y, Z)
fig.add(s)
act = fig.objects[1].actors[0] #object[1] is the surface, it has one actor, which turns out to be a surface
act.property.representation = 'w' #make it a wireframe
act.property.representation = 's' #turn it back to a surface!
Comments
Post a Comment