32 lines
574 B
Python
32 lines
574 B
Python
import matplotlib
|
|
matplotlib.use('Agg')
|
|
import matplotlib.pyplot as plt
|
|
import csv
|
|
|
|
x1 = []
|
|
y1 = []
|
|
x2 = []
|
|
y2 = []
|
|
counter = 1
|
|
|
|
with open('wer.txt','r') as txtfile:
|
|
plots = csv.reader(txtfile)
|
|
for row in plots:
|
|
x1.append(int(counter))
|
|
y1.append(float(row[0]))
|
|
counter += 1
|
|
|
|
counter = 1
|
|
with open('srr.txt','r') as txtfile:
|
|
plots = csv.reader(txtfile)
|
|
for row in plots:
|
|
x2.append(int(counter))
|
|
y2.append(float(row[0]))
|
|
counter += 1
|
|
|
|
plt.plot(x1,y1,x2,y2)
|
|
plt.title('Wykres')
|
|
plt.legend()
|
|
#plt.show()
|
|
plt.savefig('plot.png')
|