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
- mesh
pyvista.PolyData
Mesh for generating silhouette to plot.
- params
dict
,optional
If not supplied, the default theme values will be used.
color
:color_like
, color of the silhouetteline_width
:float
, edge widthopacity
:float
between 0 and 1, edge transparencyfeature_angle
: If afloat
, display sharp edges exceeding that angle in degrees.decimate
:float
between 0 and 1, level of decimation
- mesh
- 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()