differt.plotting.set_backend

Contents

differt.plotting.set_backend#

set_backend(backend)[source]#

Set default backend for future plotting utilities.

Parameters:

backend (str) – The name of the backend to be passed to get_backend.

Return type:

None

Examples

The following example shows how to set the default plotting backend.

>>> import differt.plotting as dplt
>>>
>>> dplt.set_backend("matplotlib")  # We can change the default backend
>>> dplt.get_backend()  # So that now it defaults to 'matplotlib'
'matplotlib'
>>> dplt.set_backend("vispy")  # Reset to 'vispy'
>>> dplt.get_backend()
'vispy'