From 11031f246a8ec47eb0ffca285138220eb717415e Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 31 Jan 2025 03:35:28 +0100 Subject: tmp: add most recent progress --- physics/plots/plot_errors.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 physics/plots/plot_errors.py (limited to 'physics/plots') 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() -- cgit v1.2.3