s452108-mlworkshops/plotsrr.py

24 lines
406 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 = []
i = 0
with open('averagesrr.txt','r') as csvfile:
plots = csv.reader(csvfile, delimiter=' ')
for row in plots:
2020-04-05 19:58:09 +02:00
x.append(float(row[0]))
2020-04-05 19:56:33 +02:00
y.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 18:31:32 +02:00
plt.xlabel('SRR')
plt.ylabel('Numer')
2020-04-05 19:55:01 +02:00
plt.title('Average plot SRR')
2020-04-05 18:31:32 +02:00
plt.legend()
plt.savefig('plotsrr.png')