I have multiple items displayed on the pyqtgraph plotWidget, an image and some lines. When I update the image, the line are also removed and not displayed. Could someone advise a way to update the image without removing the lines (I do not want to redraw the line again since it will delay the real-time display)?
Example:
import numpy as np
import pyqtgraph as pq
img = np.random.rand(100,100)
itemShow = pg.ImageItem(img.T)
imgItem = imWidget.addItem(itemShow)
penL = pg.mkPen('r')
lineItem = imWidget.addLine(x=100, pen=penL)
After I updating the imgItem , the line is disappeared at the window.