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()