Backend TkAgg
Backend TkAgg is interactive backend. Turning interactive mode on.matplotlib的默认backend是TkAgg,而FltkAgg, GTK, GTKAgg, GTKCairo, TkAgg , Wx or WxAgg这几个backend都要求有GUI图形界面的。
[*]
import matplotlib.pyplot as plt
[*]
Backend TkAgg is interactive backend. Turning interactive mode on.
[*]
[*]
plt.get_backend()
[*]
Out[3]: u'TkAgg'
在ssh等远程连接无图形界面时,指定不需要GUI的backend(Agg, Cairo, PS, PDF or SVG)
[*]
import matplotlib.pyplot as plt
[*]
plt.switch_backend('agg')
https://blog.csdn.net/mangobar/article/details/82916995 https://blog.csdn.net/Z_lbj/article/details/80418183
页:
[1]