add_silhouette

Plotter.add_silhouette(mesh, params=None)

Add a silhouette of a PyVista or VTK dataset to the scene.

A silhouette can also be generated directly in add_mesh. See also Silhouette Highlight.

Parameters
meshpyvista.PolyData

Mesh for generating silhouette to plot.

paramsdict, optional
  • If not supplied, the default theme values will be used.

  • color: str or 3-item list, color of the silhouette

  • line_width: float, edge width

  • opacity: float between 0 and 1, edge transparency

  • feature_angle: If a float, display sharp edges exceeding that angle in degrees.

  • decimate: float between 0 and 1, level of decimation

Returns
vtk.vtkActor

VTK actor of the silhouette.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> bunny = examples.download_bunny()
>>> plotter = pyvista.Plotter()
>>> _ = plotter.add_mesh(bunny, color='tan')
>>> _ = plotter.add_silhouette(bunny,
...     params={'color': 'red', 'line_width': 8.0})
>>> plotter.view_xy()
>>> plotter.show()
../../../_images/pyvista-Plotter-add_silhouette-1_00_00.png