set_jupyter_backend#
- set_jupyter_backend(
- backend: TypeAliasForwardRef('pyvista.JupyterBackendOptions') | str,
- name=None,
- **kwargs,
Set the plotting backend for a jupyter notebook.
- Parameters:
- backend
str Jupyter backend to use when plotting. Must be one of the following:
'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.'client': Export/serialize the scene graph to be rendered with VTK.js client-side throughtrame. Requirestrameandjupyter-server-proxyto be installed.'server': Render remotely and stream the resulting VTK images back to the client usingtrame. This replaces the'ipyvtklink'backend with better performance. Supports the most VTK features, but suffers from minor lag due to remote rendering. Requires that a virtual framebuffer be set up when displaying on a headless server. Must have at leasttrameandjupyter-server-proxyinstalled for cloud/remote Jupyter instances. This mode is also aliased by'trame'.'trame': The full Trame-based backend that combines both'server'and'client'into one backend. This requires a virtual frame buffer.'html': Export/serialize the scene graph to be rendered with the Trame client backend but in a static HTML file.'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.
Custom backends registered via
register_jupyter_backend()are also accepted. PassNoneto reset to auto-detection at display time.- name
str,optional Unused.
Deprecated since version 0.49: This parameter has never had any effect and will be removed.
- **kwargs
dict,optional Unused.
Deprecated since version 0.49: These parameters have never had any effect and will be removed.
- backend
Examples#
Download Python source code | Download Jupyter notebook
Enable the trame Trame backend.
>>> pv.set_jupyter_backend('trame')
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')
Reset to auto-detect the best available backend.
>>> pv.set_jupyter_backend(None)
Used In#
Guides
- Cells (1 use)
- Composite Datasets (1 use)
- Gridded Data (1 use)
- Partitioned Datasets (1 use)
- Point Sets (1 use)
- What Is a Mesh? (1 use)
- Why PyVista? (1 use)