diff --git a/src/gui/DamarisGUI.py b/src/gui/DamarisGUI.py index de6bad7..c9a24c9 100644 --- a/src/gui/DamarisGUI.py +++ b/src/gui/DamarisGUI.py @@ -2956,11 +2956,14 @@ class MonitorWidgets: self.measurementresultgraph = None elif self.measurementresultgraph is not None: # clear errorbars - self.matplot_axes.lines.remove( self.measurementresultgraph[ 0 ] ) - for l in self.measurementresultgraph[ 1 ]: - self.matplot_axes.lines.remove( l ) - for l in self.measurementresultgraph[ 2 ]: - self.matplot_axes.collections.remove( l ) + #self.matplot_axes.lines.remove( self.measurementresultgraph[ 0 ] ) + self.measurementresultgraph[0].remove() + for line in self.measurementresultgraph[ 1 ]: + #self.matplot_axes.lines.remove( l ) + line.remove() + for line in self.measurementresultgraph[ 2 ]: + #self.matplot_axes.collections.remove( l ) + line.remove() self.measurementresultgraph = None self.matplot_axes.clear( ) self.matplot_axes.grid( True )