pyvista.Plotter.remove_actor#
- Plotter.remove_actor(actor, reset_camera=False, render=True)[ソース]#
レンダリングからアクターを削除します.
- パラメータ:
- actor
str| vtkActor |list|tuple If the type is
str, removes the previously added actor with the given name. If the type is vtkActor, removes the actor if it's previously added to the Renderer. Iflistortuple, removes iteratively each actor.- reset_camerabool,
optional すべてのアクターが見えるようにカメラをリセットします.
- renderbool,
optional アクターの除去時にレンダリングします.アクターが削除されたときにレンダリングウィンドウがレンダリングされないようにするには,これを
Falseに設定します.
- actor
- 戻り値:
- bool
アクターが削除された場合は
True.アクターが削除されていない場合はFalse.
例
2つのメッシュをプロッターに追加し,球体のアクタを削除します.
>>> import pyvista as pv >>> mesh = pv.Cube() >>> pl = pv.Plotter() >>> cube_actor = pl.add_mesh(pv.Cube(), show_edges=True) >>> sphere_actor = pl.add_mesh(pv.Sphere(), show_edges=True) >>> _ = pl.remove_actor(cube_actor) >>> pl.show()