jupyter_backend#
- property DarkTheme.jupyter_backend: str#
Return or set the jupyter notebook plotting backend.
Jupyter backend to use when plotting. Must be one of the following:
'ipyvtklink'
: Render remotely and stream the resulting VTK images back to the client. Supports all VTK methods, but suffers from lag due to remote rendering. Requires that a virtual framebuffer be set up when displaying on a headless server. Must haveipyvtklink
installed.'panel'
: Convert the VTK render window to a vtkjs object and then visualize that within jupyterlab. Supports most VTK objects. Requires that a virtual framebuffer be set up when displaying on a headless server. Must havepanel
installed.'ipygany'
: Convert all the meshes intoipygany
meshes and streams those to be rendered on the client side. Supports VTK meshes, but few others. Aside fromnone
, this is the only method that does not require a virtual framebuffer. Must haveipygany
installed.'pythreejs'
: Convert all the meshes intopythreejs
meshes and streams those to be rendered on the client side. Aside fromipygany
, this is the only method that does not require a virtual framebuffer. Must havepythreejs
installed.'static'
: Display a single static image within the JupyterLab environment. Still requires that a virtual framebuffer be set up when displaying on a headless server, but does not require any additional modules to be installed.'none'
: Do not display any plots within jupyterlab, instead display using dedicated VTK render windows. This will generate nothing on headless servers even with a virtual framebuffer.
Examples
Enable the pythreejs backend.
>>> import pyvista as pv >>> pv.set_jupyter_backend('pythreejs')
Enable the ipygany backend.
>>> import pyvista as pv >>> pv.set_jupyter_backend('ipygany')
Enable the panel backend.
>>> pv.set_jupyter_backend('panel')
Enable the ipyvtklink backend.
>>> pv.set_jupyter_backend('ipyvtklink')
Just show static images.
>>> pv.set_jupyter_backend('static')
Disable all plotting within JupyterLab and display using a standard desktop VTK render window.
>>> pv.set_jupyter_backend(None) # or 'none'