This code reads the output of the arduino fine and live plots the values. But when I close the window, the serial connection doesn\'t close.
import pyqtgraph as p