Why mayavi does not show figure?

610 Views Asked by At

I have just installed vtk, mayavi. Then I ran an example, but nothing showed. Can you tell me how to show the figure?

import mayavi.mlab as mlab
import numpy as np
import vtk
x, y, z, value = np.random.random((4, 40))
mlab.points3d(x, y, z, value)
1

There are 1 best solutions below

1
On BEST ANSWER

As described in the documentation, see here, you need to call mlab.show() when running such a script after your mlab.points3d().