PyVista env
1. Basic operations
You can check pyvista
configuration:
import pyvista as pv
pv.start_xvfb()
pv.Report()
Results
Out[1]: -------------------------------------------------------------------------------- Date: Fri Nov 29 11:51:13 2024 UTC OS : Linux (Ubuntu 24.04) CPU(s) : 4 Machine : x86_64 Architecture : 64bit RAM : 15.6 GiB Environment : IPython File system : ext4 GPU Vendor : Mesa/X.org GPU Renderer : llvmpipe (LLVM 15.0.6, 256 bits) GPU Version : 4.5 (Core Profile) Mesa 22.3.2 MathText Support : True Python 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0] pyvista : 0.44.2 vtk : 9.3.1 numpy : 1.26.4 matplotlib : 3.9.2 scooby : 0.10.0 pooch : 1.8.2 pillow : 10.2.0 imageio : 2.36.1 IPython : 8.30.0 colorcet : 3.1.0 cmocean : 4.0.3 ipywidgets : 8.1.5 scipy : 1.11.4 meshio : 5.3.5 trame : 3.7.0 trame_client : 3.5.0 trame_server : 3.2.3 trame_vtk : 2.8.12 trame_vuetify : 2.7.2 jupyter_server_proxy : 4.4.0 nest_asyncio : 1.6.0 --------------------------------------------------------------------------------
Here is a small example to plot a sphere:
sphere = pv.Sphere()
# short example
sphere.plot(jupyter_backend='client')
Results
# long example
plotter = pv.Plotter(notebook=True)
plotter.add_mesh(sphere)
plotter.show(jupyter_backend='trame')