From 1a2d4c52024f4b6d61ea52c256936f5d7915e59a Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Tue, 11 Mar 2025 12:41:58 +0100
Subject: [PATCH] rm parse_commandline from ex/... (#1123)

---
 auto/Examples/scatter2d/Interference1DLattice.py | 4 +---
 auto/Examples/specular/FootprintCorrection.py    | 4 +---
 rawEx/scatter2d/Interference1DLattice.py         | 3 ++-
 rawEx/specular/FootprintCorrection.py            | 3 ++-
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/auto/Examples/scatter2d/Interference1DLattice.py b/auto/Examples/scatter2d/Interference1DLattice.py
index 470edc27741..5320e0afc03 100755
--- a/auto/Examples/scatter2d/Interference1DLattice.py
+++ b/auto/Examples/scatter2d/Interference1DLattice.py
@@ -66,7 +66,5 @@ if __name__ == '__main__':
     sample = get_sample()
     simulation = get_simulation(sample)
     result = simulation.simulate()
-    plotargs = bp.parse_commandline()
-    plotargs['intensity_min'] = 1e-03
-    bp.plot_simulation_result(result, **plotargs)
+    bp.plot_simulation_result(result, intensity_min=1e-3)
     bp.plt.show()
diff --git a/auto/Examples/specular/FootprintCorrection.py b/auto/Examples/specular/FootprintCorrection.py
index e6fb62cf30c..0f65a7cd0ec 100755
--- a/auto/Examples/specular/FootprintCorrection.py
+++ b/auto/Examples/specular/FootprintCorrection.py
@@ -29,7 +29,5 @@ if __name__ == '__main__':
         simulate(None, "Without footprint"),
     ]
 
-    plotargs = bp.parse_commandline()
-    plotargs['legendloc'] = 'lower left'
-    bp.plot_multicurve(results, **plotargs)
+    bp.plot_multicurve(results, legendloc='lower left')
     bp.plt.show()
diff --git a/rawEx/scatter2d/Interference1DLattice.py b/rawEx/scatter2d/Interference1DLattice.py
index 1b4edde036c..436a253a08d 100755
--- a/rawEx/scatter2d/Interference1DLattice.py
+++ b/rawEx/scatter2d/Interference1DLattice.py
@@ -66,11 +66,12 @@ if __name__ == '__main__':
     sample = get_sample()
     simulation = get_simulation(sample)
     result = simulation.simulate()
+    <%- if test_mode or figure_mode -%>
     plotargs = bp.parse_commandline()
     plotargs['intensity_min'] = 1e-03
     bp.plot_simulation_result(result, **plotargs)
-    <%- if test_mode or figure_mode -%>
     bp.export(**plotargs)
     <%- else -%>
+    bp.plot_simulation_result(result, intensity_min=1e-3)
     bp.plt.show()
     <%- end -%>
diff --git a/rawEx/specular/FootprintCorrection.py b/rawEx/specular/FootprintCorrection.py
index fbcbd15424c..7ae37fe1306 100755
--- a/rawEx/specular/FootprintCorrection.py
+++ b/rawEx/specular/FootprintCorrection.py
@@ -29,11 +29,12 @@ if __name__ == '__main__':
         simulate(None, "Without footprint"),
     ]
 
+    <%- if test_mode or figure_mode -%>
     plotargs = bp.parse_commandline()
     plotargs['legendloc'] = 'lower left'
     bp.plot_multicurve(results, **plotargs)
-    <%- if test_mode or figure_mode -%>
     bp.export(**plotargs)
     <%- else -%>
+    bp.plot_multicurve(results, legendloc='lower left')
     bp.plt.show()
     <%- end -%>
-- 
GitLab