fixed matplotlib 3.10 error in cleanup of MeasurementResult plots

This commit is contained in:
2026-03-16 16:52:26 +01:00
parent f545b4021c
commit c81b05cea5
+8 -5
View File
@@ -2956,11 +2956,14 @@ class MonitorWidgets:
self.measurementresultgraph = None self.measurementresultgraph = None
elif self.measurementresultgraph is not None: elif self.measurementresultgraph is not None:
# clear errorbars # clear errorbars
self.matplot_axes.lines.remove( self.measurementresultgraph[ 0 ] ) #self.matplot_axes.lines.remove( self.measurementresultgraph[ 0 ] )
for l in self.measurementresultgraph[ 1 ]: self.measurementresultgraph[0].remove()
self.matplot_axes.lines.remove( l ) for line in self.measurementresultgraph[ 1 ]:
for l in self.measurementresultgraph[ 2 ]: #self.matplot_axes.lines.remove( l )
self.matplot_axes.collections.remove( l ) line.remove()
for line in self.measurementresultgraph[ 2 ]:
#self.matplot_axes.collections.remove( l )
line.remove()
self.measurementresultgraph = None self.measurementresultgraph = None
self.matplot_axes.clear( ) self.matplot_axes.clear( )
self.matplot_axes.grid( True ) self.matplot_axes.grid( True )