Actor.copy(deep=True) Actor[source]#

Create a copy of this actor.

deepbool, default: True

Create a shallow or deep copy of the actor. A deep copy will have a new property and mapper, while a shallow copy will use the mapper and property of this actor.


Deep or shallow copy of this actor.


Create an actor of a cube by adding it to a pyvista.Plotter and then copy the actor, change the properties, and add it back to the pyvista.Plotter.

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> pl = pv.Plotter()
>>> actor = pl.add_mesh(mesh, color='b')
>>> new_actor = actor.copy()
>>> = 'wireframe'
>>> new_actor.prop.line_width = 5
>>> new_actor.prop.color = 'r'
>>> = False
>>> _ = pl.add_actor(new_actor)