Binh Thien
Binh Thien

Reputation: 395

Why mayavi does not show figure?

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)

Upvotes: 0

Views: 796

Answers (1)

Alf
Alf

Reputation: 1989

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

Upvotes: 1

Related Questions