Note
Go to the end to download the full example code or to run this example in your browser via Binder
Test out PyVista’s Jupyter Backend#
Become familiar with PyVista Jupyter backend.
import pyvista as pv
# Set/enable the backed
pv.set_jupyter_backend('trame')
pl = pv.Plotter()
pl.add_mesh(pv.ParametricKlein())
pl.show()
![jupyter](../../_images/sphx_glr_jupyter_001.png)
Client-side rendering only (in browser)
pl = pv.Plotter()
pl.add_mesh(pv.ParametricRandomHills().elevation())
pl.show(jupyter_backend='client')
![jupyter](../../_images/sphx_glr_jupyter_002.png)
/home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/pyvista/plotting/plotter.py:6925: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
warnings.warn(
Server-side rendering only
pl = pv.Plotter()
pl.add_volume(pv.Wavelet())
pl.show(jupyter_backend='server')
![jupyter](../../_images/sphx_glr_jupyter_003.png)
/home/runner/.virtualenvs/.venv/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.821 seconds)