简体   繁体   中英

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')

好的,看起来很简单:

mlab.options.offscreen = True

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM