I have a python program using pyplot (backend:tkagg), in which simply a matplotlib is created with some stuff in it. When I want to exit the program, I immediately call:
plt.close('all')
to shut it down. Strangely enough, the program dosnt exit.
Following it with the debugger I saw that after everithing is done, it returns to
class Show(ShowBase):
def mainloop(self):
Tk.mainloop()
in backend_tkagg.py,
followed by
if not is_interactive():
self.mainloop()
in the same file, then to
def show(*args, **kw):
global _show
_show(*args, **kw)
in pyplot.py So it appears that I am still in the pyplot loop!
How do I exit from it correctly?
thanks...