Hello! Thank you for your respond!
I started with doing that method but it didn't work as when i called clear(), it removed the data from the graph as it supposed to but when i started to plot again, calling another function, it started where it stopped and showed previous plots.
It feels like it never actually empty the setData or DataItem.
example:
win = pg.GraphicsWindow(...)
p1 = win.addPlot(...)
curve1= p1.plot()
curve2=p1.plot()
def somefunction():
if x=something:
curve1.clear()
curve2.clear()
def replot():
plot new data
curve1.setData(x)
curve2.setData(y)
My point is, at function "replot" it plots old values and start where "somefunction" was called, where clear() was called. Does it work for you when you call clear?