pyvista.Actor.copy#
- Actor.copy(deep: bool = True) Self[source]#
 Create a copy of this actor.
- Parameters:
 - Returns:
 ActorDeep or shallow copy of this actor.
Examples
Create an actor of a cube by adding it to a
Plotterand then copy the actor, change the properties, and add it back to thePlotter.>>> import pyvista as pv >>> mesh = pv.Cube() >>> pl = pv.Plotter() >>> actor = pl.add_mesh(mesh, color='b') >>> new_actor = actor.copy() >>> new_actor.prop.style = 'wireframe' >>> new_actor.prop.line_width = 5 >>> new_actor.prop.color = 'r' >>> new_actor.prop.lighting = False >>> _ = pl.add_actor(new_actor) >>> pl.show()