Вот эта ошибкаscale_max - scale_min)
мой код указан ниже:
class Visualization(HasTraits):
scene = Instance(MlabSceneModel, ())
@on_trait_change('scene.activated')
def update_plot(self):
# x = np.linspace(0,10,50)
# y = np.linspace(0,15,50)
# z = np.linspace(0,8,50)
mycsv = csv.reader(open("./Tunnel.saf.csv"))
for row in mycsv:
x = float(row[0])
y = float(row[1])
z = float(row[2])
X, Y, Z = np.meshgrid(x, y, z)
s = np.cos(X) + np.sin(Y) + Z**0.5
b1 = np.percentile(s, 20)
b2 = np.percentile(s, 80)
s = pipeline.volume(pipeline.scalar_field(s), vmin=b1, vmax=b2)
#s = surf(x, y, f, colormap="Oranges")
#s = outline()
s = axes()
#s = orientation_axes()
#cs = contour_surf(x, y, f, contour_z=0)
#self.scene.mlab.mesh(r[0],r[1],r[2], scalars=Y_lm.real, colormap="cool")
view = View(Item('scene', editor=SceneEditor(scene_class=MayaviScene),
height=250, width=300, show_label=False),
resizable=True # We need this to resize with the parent widget
)