fixed matplotlib (3.10) error in trixie

This commit is contained in:
2026-03-16 14:22:04 +01:00
parent a2ba1ff720
commit 1f9b78afac
3 changed files with 8 additions and 10 deletions
-1
View File
@@ -53,7 +53,6 @@ if args.debug:
resource.setrlimit(resource.RLIMIT_CORE, (-1, -1)) resource.setrlimit(resource.RLIMIT_CORE, (-1, -1))
except ImportError: except ImportError:
pass pass
matplotlib.rcParams["verbose.level"] = "debug"
print(args) print(args)
d = damaris.gui.DamarisGUI.DamarisGUI(args.exp_script, args.res_script, start_immediately=args.run) d = damaris.gui.DamarisGUI.DamarisGUI(args.exp_script, args.res_script, start_immediately=args.run)
d.run() d.run()
+7 -8
View File
@@ -50,8 +50,7 @@ import numpy
# math graphics # math graphics
import matplotlib import matplotlib
# force noninteractive and use of numpy # force noninteractive
# matplotlib.rcParams["numerix"]="numpy"
matplotlib.rcParams[ "interactive" ] = "False" matplotlib.rcParams[ "interactive" ] = "False"
matplotlib.rcParams[ "text.usetex" ] = "False" matplotlib.rcParams[ "text.usetex" ] = "False"
matplotlib.rcParams[ "axes.formatter.limits" ] = "-3,3" matplotlib.rcParams[ "axes.formatter.limits" ] = "-3,3"
@@ -193,7 +192,7 @@ class DamarisGUI:
# lock file to prevent other DAMARIS to start immediatly # lock file to prevent other DAMARIS to start immediatly
self.lockfile = LockFile() # = os.path.expanduser("~/.damaris.lock") self.lockfile = LockFile() # = os.path.expanduser("~/.damaris.lock")
self.id = None self.id = None
#to stop queued experiments #to stop queued experiments
self.stop_experiment_flag = threading.Event() self.stop_experiment_flag = threading.Event()
@@ -2475,9 +2474,8 @@ class MonitorWidgets:
self.display_table.attach( self.matplot_canvas, 0, 6, 0, 1, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, 0, 0 ) self.display_table.attach( self.matplot_canvas, 0, 6, 0, 1, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, 0, 0 )
self.matplot_canvas.show( ) self.matplot_canvas.show( )
# Matplot Toolbar hinzufuegen (Display_Table, 2. Zeile) # Matplot Toolbar hinzufuegen (Display_Table, 2. Zeile)
self.matplot_toolbar = matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3( self.matplot_canvas, self.matplot_toolbar = matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3( self.matplot_canvas )
self.main_window )
self.display_table.attach( self.matplot_toolbar, 0, 1, 1, 2, gtk.AttachOptions.FILL | gtk.AttachOptions.EXPAND, 0, 0, 0 ) self.display_table.attach( self.matplot_toolbar, 0, 1, 1, 2, gtk.AttachOptions.FILL | gtk.AttachOptions.EXPAND, 0, 0, 0 )
self.matplot_toolbar.show( ) self.matplot_toolbar.show( )
@@ -2969,8 +2967,9 @@ class MonitorWidgets:
if not hasattr( self, "graphen" ): if not hasattr( self, "graphen" ):
self.graphen = [ ] self.graphen = [ ]
elif self.graphen: elif self.graphen:
for l in self.graphen: for line in self.graphen:
self.matplot_axes.lines.remove( l ) #self.matplot_axes.lines.remove( line )
line.remove()
self.graphen = [ ] self.graphen = [ ]
self.matplot_axes.clear( ) self.matplot_axes.clear( )
self.matplot_axes.grid( True ) self.matplot_axes.grid( True )
+1 -1
View File
@@ -7,5 +7,5 @@ def test():
return e return e
def experiment(): def experiment():
for i in range(100): for i in range(10):
yield test() yield test()