draw_surface

pysac.plot.mayavi_plotting_functions.draw_surface(surf_poly, cmap, scalar='vperp', lines=False, lim=None, log10=False, colorbar_label='Velocity Perpendicular\n to Surface [km/s]', **colourbar_args)[source] [edit on github]

Draw a mayavi surface from a PolyData object.

Parameters:

surf_poly: tvtk.PolyData Object

The polydata object containing the surface information.

cmap: ndarray or string

The colour map to scale the scalar data with.

scalar: string

The name of the tvtk scalar to plot.

lines: (optional) bool

If True then lines are not removed from the PolyData object and will be plotted.

lim: [None, float, int or [min,max]]

If lim is None symmetric limits will be created covering the whole dynamic range, if the input is a number symmetric limts will e made with that as a maximum, if a [min,max] pair is passed that will be the limits.

log10: bool

Scale the scalar with log scaling.

colorbar_label: string

Label the colorbar.

**colorar_args: dict

Other kwargs will be passed to mayavi_plotting_functions.add_colourbar()

Returns:

new_tube: mayavi.modules.surface.Surface

The surface object

surf_bar: ScalarBarWidget

The colorbar object

surf_bar_label: mayavi.modules.text.Text

The object created to label the colorbar