如何確定 matplotlib 使用哪個後端?


我們可以使用 matplotlib.get_backend() 獲取後端值。

步驟

  • 匯入 matplotlib。

  • 使用 get_backend() 方法返回當前後端的名稱。

示例

import matplotlib
print("Backend used by matplotlib is: ", matplotlib.get_backend())

輸出

Backend used by matplotlib is: GTK3Agg

更新於:15-Mar-2021

832 次瀏覽

開啟你的 職業 生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.