The python program is not ending when tkinter window is closed
I've done a small change,anyway you must use this
root.protocol("WM_DELETE_WINDOW", quit_me)
see below, on my debian, launching the script from terminal and closing the tkinter window it works.
from tkinter import *from matplotlib import pyplot as pltimport matplotlib.animation as animationfrom matplotlib import stylefrom matplotlib.backends.backend_tkagg import FigureCanvasTkAggimport numpy as npdef quit_me(): print('quit') root.quit() root.destroy()root = Tk() root.protocol("WM_DELETE_WINDOW", quit_me)root.geometry("800x500+100+100")root.title('root window')