diff --git a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py index 7d23309b..318351f4 100644 --- a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py +++ b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py @@ -1019,7 +1019,7 @@ class PlotItem(GraphicsWidget): if numCurves != -1: if self.ctrl.forgetTracesCheck.isChecked(): curve.clear() - self.removeItem(curves[i]) + self.removeItem(curve) else: curve.hide()