s452108-mlworkshops/plotsrr.py

24 lines
399 B
Python
Raw Normal View History

2020-04-05 20:03:21 +02:00
import matplotlib
matplotlib.use('Agg')
2020-04-05 18:31:32 +02:00
import matplotlib.pyplot as plt
import csv
x = []
y = []
2020-04-05 20:16:41 +02:00
i = 1
2020-04-05 18:31:32 +02:00
2020-04-05 20:25:23 +02:00
with open('averagesrr.txt','r') as file:
plots = csv.reader(file)
2020-04-05 18:31:32 +02:00
for row in plots:
2020-04-05 20:12:48 +02:00
y.append(float(row[0]))
x.append(int(i))
2020-04-05 18:31:32 +02:00
i=i+1
2020-04-05 20:00:38 +02:00
plt.plot(x,y)
2020-04-05 20:21:36 +02:00
plt.ylabel('SRR (%)')
2020-04-05 20:16:41 +02:00
plt.xlabel('Build number')
2020-04-05 20:21:36 +02:00
plt.title('Plot of average SRR')
2020-04-05 18:31:32 +02:00
plt.legend()
plt.savefig('plotsrr.png')