Hello,
I have plotwidget and whenever I call refreshView function, It should clear the widget including the legend items so that I can plot some other thing.
(using just self.pw.clear does not work for legend items so I had to add the next line to clear the legend items!)
In Debian, when I run the following code, the plotwidget is cleared and the labels are cleared and I plot something new.
self.pw=pg.PlotWidget(name='myplot')
def refreshView():
self.pw.clear()
self.pw.getPlotItem().legend.items=[]
# Plot smthng new!
But in Ubuntu, It does not clear the 'legend items'!! Whenever I plot something new, It add new legends to the old one so that get accumulated.
Is it a bug or I am doing something wrong?
Thanks a lot for your helps,
Regards
Ecem