临时采用Tkinter作为GUI后端,导入matplotlib库代码修改如下
import matplotlib
matplotlib.use('TkAgg') # 设置后端必须在导入pyplot之前
import matplotlib.pyplot as plt
临时采用Tkinter作为GUI后端,导入matplotlib库代码修改如下
import matplotlib
matplotlib.use('TkAgg') # 设置后端必须在导入pyplot之前
import matplotlib.pyplot as plt