注釈
完全なサンプルコードをダウンロードしたり、Binderを使ってブラウザでこのサンプルを実行するには、 最後に進んでください 。
PyVistaのJupyterバックエンドを試す#
PyVista Jupyterバックエンドに慣れる.
import pyvista as pv
# Set/enable the backed
pv.set_jupyter_backend("trame")
pl = pv.Plotter()
pl.add_mesh(pv.ParametricKlein())
pl.show()

(ブラウザで)クライアント側レンダリングのみ
pl = pv.Plotter()
pl.add_mesh(pv.ParametricRandomHills().elevation())
pl.show(jupyter_backend="client")

/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/pyvista/plotting/plotter.py:6925: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
warnings.warn(
サーバー側レンダリングのみ
pl = pv.Plotter()
pl.add_volume(pv.Wavelet())
pl.show(jupyter_backend="server")

/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/pyvista/plotting/plotter.py:6925: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
warnings.warn(
Total running time of the script: (0 minutes 1.716 seconds)