如何確定 matplotlib 使用哪個後端?
我們可以使用 matplotlib.get_backend() 獲取後端值。
步驟
匯入 matplotlib。
使用 get_backend() 方法返回當前後端的名稱。
示例
import matplotlib
print("Backend used by matplotlib is: ", matplotlib.get_backend())輸出
Backend used by matplotlib is: GTK3Agg
廣告
我們可以使用 matplotlib.get_backend() 獲取後端值。
匯入 matplotlib。
使用 get_backend() 方法返回當前後端的名稱。
import matplotlib
print("Backend used by matplotlib is: ", matplotlib.get_backend())Backend used by matplotlib is: GTK3Agg