I could reproduce the problem I have in the pyqtgraph example GLLinPlotItem.py. I just added the lines
print (w.items)
for item in w.items:
if (type (item) == gl.GLLinePlotItem):
print (item)
w.removeItem (item)
after the for loop that loads the plot with the GLLinePlotItems.
while print (w.items) prints all items my for loop prints and deletes only every second one.
I found this thread: Python for loops only every second Item but there is no solution.
Any ideas?
Thanks a lot
Martin
Edit: if you comment w.removeItem it prints all items.