メッシュまたはプロット全体の消去

メッシュまたはプロット全体の消去#

This example demonstrates how to remove elements from a scene using clear().

from __future__ import annotations

import pyvista as pv
clear

プロットウィンドウ全体をクリアする:

clear

または,追加するときに任意のアクターに name を指定し,アクターが後で同じ名前で追加された場合に,前のアクターを置き換えます:

plotter = pv.Plotter()
plotter.add_mesh(pv.Sphere(), name='mymesh')
plotter.add_mesh(pv.Plane(), name='mymesh')
# Only the Plane is shown.
plotter.show()
clear

Tags: plot

Total running time of the script: (0 minutes 0.545 seconds)

Sphinx-Galleryによるギャラリー