pyvista.Actor.copy#
- Actor.copy(deep=True) Actor [source]#
Create a copy of this actor.
- Parameters:
- Returns:
pyvista.Actor
Deep or shallow copy of this actor.
Examples
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 thepyvista.Plotter
.>>> 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()