From c7afb42f4aefa175337fa7baa1e95afbe2393fa2 Mon Sep 17 00:00:00 2001 From: y8z Date: Wed, 14 Aug 2024 10:23:43 -0400 Subject: [PATCH] fix Bragg plot line removal issue --- addie/plot/canvas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addie/plot/canvas.py b/addie/plot/canvas.py index 7dc53786..2a6d2cfc 100644 --- a/addie/plot/canvas.py +++ b/addie/plot/canvas.py @@ -447,7 +447,8 @@ def remove_plot_1d(self, plot_key): """ if plot_key in self._lineDict: try: - self.axes.lines.remove(self._lineDict[plot_key]) + line = self.axes.lines[0] + line.remove() except ValueError as r_error: error_message = 'Unable to remove to 1D line %s (ID=%d) due to %s.' % ( str(self._lineDict[plot_key]), plot_key, str(r_error))