I am trying to plot a realtime graph using matplotlib\'s FuncAnimation class. The data is coming from arduino using pyserial library. I have tried the following code to plot