How do I plot in real-time in a while loop using matplotlib? How do I plot in real-time in a while loop using matplotlib? python python