how to update the plot in my tkinter window?
Solution 1:
It looks like you are creating a new Figure every time you want to update the canvas.
fig = Figure(figsize = (5, 5), dpi = 100)
Maybe you should only create once the fig
outside the function and pass it as an argument.