s452111-mlworkshops/draw_plot_srr.py

23 lines
441 B
Python
Raw Permalink Normal View History

2020-04-22 16:54:13 +02:00
import matplotlib
2020-04-22 17:45:43 +02:00
matplotlib.use('Agg')
2020-04-22 16:54:13 +02:00
import matplotlib.pyplot as plt
import csv
axe_x = []
axe_y = []
2020-04-22 17:45:43 +02:00
it = 1
2020-04-22 16:54:13 +02:00
with open('srr.txt','r') as file:
plots = csv.reader(file)
for row in plots:
2020-04-22 17:45:43 +02:00
axe_y.append(float(row[0]))
axe_x.append(int(it))
it+=1
2020-04-22 16:54:13 +02:00
2020-04-22 17:45:43 +02:00
plt.plot(axe_x,axe_y)
2020-04-22 16:54:13 +02:00
plt.ylabel('Percentage SRR')
plt.xlabel('Build')
plt.title('SRR over several builds')
plt.legend()
plt.savefig('srr_over_several_builds.png')