import matplotlib.pyplot as plt def main(): accuracy = [] build_numbers = [] with open("maetrics.txt") as f: for line in f: accuracy.append(float(line.split(",")[0])) build_numbers.append(int(line.split(",")[1])) plt.plot(build_numbers, accuracy) plt.xlabel("Build Number") plt.ylabel("Accuracy") plt.title("Accuracy of the model over time") plt.xticks(range(min(build_numbers), max(build_numbers) + 1)) plt.show() plt.savefig("plot.png") if __name__ == "__main__": main()