pyvista.Plotter.add_actor

pyvista.Plotter.add_actor#

Plotter.add_actor(
actor,
reset_camera=False,
name=None,
culling=False,
pickable=True,
render=True,
remove_existing_actor=True,
)[source]#

Add an actor to render window.

Creates an actor if input is a mapper.

Parameters:
actorvtk.vtkActor | vtk.vtkMapper | pyvista.Actor

The actor to be added. Can be either vtkActor or vtkMapper.

reset_camerabool, default: False

Resets the camera when True.

namestr, optional

Name to assign to the actor. Defaults to the memory address.

cullingstr, default: False

Does not render faces that are culled. Options are 'front' or 'back'. This can be helpful for dense surface meshes, especially when edges are visible, but can cause flat meshes to be partially displayed.

pickablebool, default: True

Whether to allow this actor to be pickable within the render window.

renderbool, default: True

If the render window is being shown, trigger a render after adding the actor.

remove_existing_actorbool, default: True

Removes any existing actor if the named actor name is already present.

Returns:
actorvtk.vtkActor or pyvista.Actor

The actor.

actor_propertiesvtk.Properties

Actor properties.