Figure handling functions

figure

enthought.mayavi.mlab.figure(name=None)
Creates a new scene or retrieves an existing scene. If the mayavi engine is not running this also starts it.

savefig

enthought.mayavi.mlab.savefig(filename, size=None, **kwargs)

Save the current scene. The output format are deduced by the extension to filename. Possibilities are png, jpg, bmp, tiff, ps, eps, pdf, rib (renderman), oogl (geomview), iv (OpenInventor), vrml, obj (wavefront)

If an additional size (2-tuple) argument is passed the window is resized to the specified size in order to produce a suitably sized output image. Please note that when the window is resized, the window may be obscured by other widgets and the camera zoom is not reset which is likely to produce an image that does not reflect what is seen on screen.

Any extra keyword arguments are passed along to the respective image format’s save method.

gcf

enthought.mayavi.mlab.gcf()
Return a handle to the current figure.

clf

enthought.mayavi.mlab.clf()
Clear the current figure.

draw

enthought.mayavi.mlab.draw()
Forces a redraw of the current figure.

Table Of Contents

Previous topic

Plotting functions

Next topic

Figure decoration functions

This Page

Quick search