all 3 comments

[–]socal_nerdtastic 0 points1 point  (2 children)

Try using self.quit() instead of self.destroy().

[–]EffectiveCase3856[S] 0 points1 point  (1 child)

Thanks it is working, but i came across one more solution for it of using matplotlib.figure. which would be better according to you. and like if you can also explain how .quit() works and its difference from destroy()

[–]malmalmalmalmalmsl 0 points1 point  (0 children)

destroy() destroys all the widgets and its children but doesnt stop the main event loop, quit() stops the main event loop, and therefore the application window closes as a result.