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

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

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

from __future__ import annotations

import pyvista as pv
clear

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

clear

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

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

Tags: plot

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

Sphinx-Galleryによるギャラリー