2 import matplotlib.pyplot
as plt
8 cumsum = numpy.cumsum(numpy.insert(x, 0, 0))
9 return (cumsum[N:] - cumsum[:-N])/N
11 filename =
"reports/configuration.confrewardRecordReport.txt" 12 if (len(sys.argv) > 1):
13 filename = sys.argv[1]
15 with open(filename)
as f:
21 entry = line.split(
":")
22 time.append(float(entry[0]))
23 temp.append(float(entry[1]))
26 avg = [0] * (windowSize - 1)
30 avg = avg[int(floor(len(avg )*ratio)): len(avg )-1]
31 time = time[int(floor(len(time)*ratio)): len(time)-1]
32 temp = temp[int(floor(len(temp)*ratio)): len(temp)-1]
37 plt.plot(time, temp,
'r-')
38 plt.plot(time, avg,
'ro')