您如何确定matplotlib使用哪个后端?

使用,我们可以获得后端值。matplotlib.get_backend()

步骤

  • 导入matplotlib。

  • 要返回当前后端的名称,请使用get_backend()方法。

示例

import matplotlib
print("matplotlib使用的后端是: ", matplotlib.get_backend())
输出结果
matplotlib使用的后端是: GTK3Agg