matplotlib.pyplot.switch_backend#
- matplotlib.pyplot.switch_backend(newbackend)[source]#
Set the pyplot backend.
Switching to an interactive backend is possible only if no event loop foranother interactive backend has started. Switching to and fromnon-interactive backends is always possible.
If the new backend is different than the current backend then all openFigures will be closed via
plt.close('all')
.- Parameters:
- newbackendstr
The case-insensitive name of the backend to use.
On this page