Backend TkAgg is interactive backend. Turning interactive mode on.
matplotlib的默认backend是TkAgg,而FltkAgg,GTK,GTKAgg,GTKCairo,TkAgg,WxorWxAgg这几个backend都要求有GUI图形界面的。importmatplotlib.pyplotaspltBackendTkAggisinteractivebackend.Turninginteractivemodeon.plt.get_backend()Out