Note
This section is only a reference, please see chapter on mlab: scripting for 3D plotting for an introduction to mlab.
Please see the section on Running mlab scripts for instructions on running the examples.
Attempts to set the physical extents of the given module.
The extents are given as (xmin, xmax, ymin, ymax, zmin, zmax). This does not work on an image plane widget, as this module does not have an actor.
Once you use this function on a module, be aware that other modules applied on the same data source will not share the same scale. Thus for instance an outline module will not respect the outline of the actors whose extent you modified. You should pass in the same “extents” parameter for this to work.You can have a look at the wigner.py example for a heavy use of this functionnality.
Note
This function does not work on some specific modules, such as Outline, Axes, or ImagePlaneWidget. For Outline and Axes, use the extent keyword argument of mlab.pipeline.outline and mlab.pipeline.axes.
Add a dataset object to the Mayavi pipeline.
Parameters
Dataset: | a tvtk dataset, or a Mayavi source. The dataset added to the Mayavi pipeline |
---|---|
Figure: | a figure identifier number or string, None or False, optionnal. If no figure keyword argument is given, the data is added to the current figure (a new figure if created if necessary). If a figure keyword argument is given, it should either the name the number of the figure the dataset should be added to, or None, in which case the data is not added to the pipeline. If figure is False, a null engine is created. This null engine does not create figures, and is mainly usefull for tensting, or using the VTK algorithms without visualization. |
Returns
The corresponding Mayavi source is returned.