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 setup when displaying on a headless server. Must have ipyvtklink 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 setup when displaying on a headless server. Must have panel installed.

  • 'ipygany' : Convert all the meshes into ipygany meshes and streams those to be rendered on the client side. Supports VTK meshes, but few others. Aside from none, this is the only method that does not require a virtual framebuffer. Must have ipygany installed.

  • 'pythreejs' : Convert all the meshes into pythreejs meshes and streams those to be rendered on the client side. Aside from ipygany, this is the only method that does not require a virtual framebuffer. Must have pythreejs installed.

  • 'static' : Display a single static image within the JupyterLab environment. Still requires that a virtual framebuffer be setup 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'