Debug
在linux下使用matplotlib画图,报错
_tkinter.TclError: no display name and no $DISPLAY environment variable
加入一句plt.switch_backend(‘agg’),即可
import matplotlib.pyplot as plt
plt.switch_backend('agg')
Debug
在linux下使用matplotlib画图,报错
_tkinter.TclError: no display name and no $DISPLAY environment variable
加入一句plt.switch_backend(‘agg’),即可
import matplotlib.pyplot as plt
plt.switch_backend('agg')