ricitron
ricitron

Reputation: 171

Python Mayavi: How can I hide the scene window?

When using mayavi in a python script, how can I hide the scene window?

I would like to create a jpeg and have the output directly to a jpeg, and not have a separate scene window appear when I run the mayavi script.

Example:

mlab.figure(bgcolor=(0,0,0),size=(1200,1200))
s = mlab.points3d(x,y,z)
mlab.savefig('output.jpg')

Upvotes: 1

Views: 372

Answers (1)

ricitron
ricitron

Reputation: 171

OK, it looks like it is easy:

mlab.options.offscreen = True

Upvotes: 2

Related Questions