I got an error when running your plotting script above at line from pyqtgraph import PlotWidget, plot, an error below occurs:
Exception has occurred: AttributeError
module 'time' has no attribute 'clock'
File "C:\Dev\VsCodePython_ *main_* .py", line 16, in <module>
from pyqtgraph import PlotWidget, plot
C:\Dev\VsCodePython_ *main_* .py is my script file with the plotting code. The pyqtgraph is in my installed list.