differt.plotting.process_vispy_kwargs

differt.plotting.process_vispy_kwargs#

process_vispy_kwargs(kwargs)[source]#

Process keyword arguments passed to some VisPy plotting utility.

Parameters:

kwargs (MutableMapping[str, Any]) –

A mutable mapping of keyword arguments passed to VisPy plotting.

Warning

The keys specified below will be removed from the mapping.

Keyword Arguments:
  • canvas (SceneCanvas) – The canvas that draws contents of the scene. If not provided, will try to access canvas from view (if supplied).

  • view (Viewbox) – The view on which contents are displayed. If not provided, will try to get a view from canvas (if supplied and has at least one view in its children).

Warning

When supplying both canvas and view, user must ensure that view in canvas.central_widget.children evaluates to True.

Return type:

tuple[SceneCanvas, ViewBox]

Returns:

The canvas and view used to display contents.