matplotlib.pyplot.switch_backend

matplotlib.pyplot.switch_backend(newbackend)[源代码]

关闭所有打开的图形并设置matplotlib后端。

这个论点不区分大小写。只有在另一个交互式后端没有启动事件循环的情况下,才能切换到交互式后端。切换到非交互后端和从非交互后端始终是可能的。

参数:
newbackendSTR

要使用的后端的名称。

使用实例 matplotlib.pyplot.switch_backend