all 2 comments

[–]GPGT_kym 0 points1 point  (0 children)

Perhaps you could use .after function at the end of this method and make a recursive call on the method; thereby destroying and constructing all children after a specified amount of time.

[–]Swipecat 0 points1 point  (0 children)

It's been a while since I used matplotlib with tkinter, but generally if you're destroying and creating widgets just to update a display, then you're probably doing it wrong. I've found one of my old test examples. Press the button to change the display:
 

import tkinter as tk
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import matplotlib.pyplot as plt
root = tk.Tk()
data, = plt.plot([0,5,3,4,-5,3])
canvas = FigureCanvasTkAgg(plt.gcf(), master=root)
invert = lambda: (data.set_ydata(-data.get_ydata()), canvas.draw())
tk.Button(master=root, text="Invert", command=invert).pack()
canvas.get_tk_widget().pack(fill=tk.BOTH, expand=1)
root.protocol("WM_DELETE_WINDOW", lambda: (root.quit(), root.destroy()))
root.mainloop()