You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
631 B
Python

#!/usr/bin/env python
import matplotlib.pylab as plt
import csv
import sys
if len(sys.argv) >= 2:
infile = sys.argv[1]
else:
infile = 'data.txt'
if len(sys.argv) == 3:
outfile = sys.argv[2]
else:
outfile = 'plot.png'
x_values = []
y_values = []
y_err = []
with open(infile) as FILE:
data = csv.reader(FILE, delimiter='\t')
for row in data:
x_values.append(float(row[4]))
y_values.append(float(row[0]))
y_err.append(float(row[1]))
plt.xlabel("Kerne")
plt.ylabel("Rechenleistung in GFlops")
plt.errorbar(x_values,y_values,yerr=y_err, fmt='.')
plt.savefig(outfile)