Pyqtgraph animation tutorial. You can open the resulting MainWindow.