summaryrefslogtreecommitdiff
path: root/physics/plots
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2025-01-31 03:35:28 +0100
committereug-vs <eugene@eug-vs.xyz>2025-01-31 03:35:28 +0100
commit11031f246a8ec47eb0ffca285138220eb717415e (patch)
treeb164f7906441ab2a757de5e997a3a8bbc25c6ff6 /physics/plots
parentaa0385d7fc7639b748965f8c029fa1e46d218c0e (diff)
downloadparticle-physics-experiments.tar.gz
tmp: add most recent progressexperiments
Diffstat (limited to 'physics/plots')
-rw-r--r--physics/plots/plot_errors.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/physics/plots/plot_errors.py b/physics/plots/plot_errors.py
new file mode 100644
index 0000000..2632489
--- /dev/null
+++ b/physics/plots/plot_errors.py
@@ -0,0 +1,25 @@
+import sys
+import matplotlib.pyplot as plt
+import numpy as np
+
+# Read the errors from the file
+
+fig = plt.figure(figsize=(10, 6))
+ax = fig.add_subplot()
+
+for filename in sys.argv[1:]:
+ print(filename)
+ try:
+ data = np.loadtxt(filename)
+ ax.plot(range(0, len(data[0])), data[0], data[1], label=f"{filename}")
+ except Exception as e:
+ print(f"Error loading {filename}: {e}")
+ continue
+
+
+ax.set_xlabel("Time")
+ax.set_ylabel("Y")
+# ax.set_zlabel("Z")
+ax.legend()
+ax.grid(True)
+plt.show()