I am building a tkinter GUI that takes in sensor data from the raspberry pi and displays it onto a window via matplotlib animation. I used this code as a basis for my gui as