I am writing a program and have created the typical fig, ax = plt.subplot(). Now, I am in a loop and want to stop the program when the window is closed. When I do close the window, a new one opens instead. I have not found a way to use not plt.fignum_exists(). What arguments do I need to pass this function to "trigger", when the window is closed? Continue reading...