register_jupyter_backend#
- register_jupyter_backend( ) None[source]#
Register a custom Jupyter backend handler.
Added in version 0.48.0.
- Parameters:
- name
str Name of the backend (e.g.
'custom'). Must not collide with a built-in backend name unlessoverride=Trueis passed.- handler
callable() A callable with signature
handler(plotter, **kwargs)that returns an IPython-displayable object.- overridebool, default:
False If
True, allow registering a name that collides with a built-in backend. Also silences the warning emitted when replacing an existing custom registration.
- name
- Raises:
ValueErrorIf
namecollides with a built-in backend andoverrideisFalse.
- Warns:
UserWarningIf
namealready refers to a registered custom backend. The new registration replaces the old one (last wins); passoverride=Trueto silence the warning.
Examples
>>> import pyvista as pv >>> def my_handler(plotter, **kwargs): ... >>> pv.register_jupyter_backend('my_backend', my_handler)