PyVistaのJupyterバックエンドを試す

PyVistaのJupyterバックエンドを試す#

PyVista Jupyterバックエンドに慣れる.

import pyvista as pv

# Set/enable the backed
pv.set_jupyter_backend("trame")
jupyter

(ブラウザで)クライアント側レンダリングのみ

pl = pv.Plotter()
pl.add_mesh(pv.ParametricRandomHills().elevation())
pl.show(jupyter_backend="client")
jupyter
/home/runner/work/pyvista-tutorial/pyvista-tutorial/tutorial/00_jupyter/jupyter.py:25: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
  pl.show(jupyter_backend="client")

サーバー側レンダリングのみ

pl = pv.Plotter()
pl.add_volume(pv.Wavelet())
pl.show(jupyter_backend="server")
jupyter
/home/runner/work/pyvista-tutorial/pyvista-tutorial/tutorial/00_jupyter/jupyter.py:33: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
  pl.show(jupyter_backend="server")
Open In Colab

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

Sphinx-Galleryによるギャラリー