matplotlib.pyplot.switch_backend

matplotlib.pyplot.switch_backend(newbackend) [source]

Close all open figures and set the Matplotlib backend.

The argument is case-insensitive. Switching to an interactive backend is possible only if no event loop for another interactive backend has started. Switching to and from non-interactive backends is always possible.

Parameters:
newbackendstr

The name of the backend to use.

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.2.2/api/_as_gen/matplotlib.pyplot.switch_backend.html