put the axes behind the graphs and don't skip the first couple frames

This commit is contained in:
Bill Currie 2003-08-12 16:24:50 +00:00
parent f7fd1d70a2
commit c73d57e9ee

View file

@ -38,7 +38,7 @@ f = open ("timeframes.txt", "rt")
lines = f.readlines ()
f.close
times = map (lambda x: (int(x) + 5)/100, lines[2:])
times = map (lambda x: (int(x) + 5)/100, lines)
sum = 0
min=max=times[0]
@ -57,6 +57,15 @@ width = (len (times) + group - 1) / group
height = max + 1
a = array.array ('B', '\0' * height * width * 3)
hline (0, width - 1, 0, white)
vline (0, 0, height - 1, white)
for y in range (0, height - 1, 10):
hline (0, 3, y, white)
for y in range (0, height - 1, 100):
hline (0, 6, y, white)
for x in range (0, width - 1, 100):
vline (x, 0, 3, white)
ravg = 0.0
ravg_span = 20
for x in range (width):
@ -88,13 +97,6 @@ for x in range (width):
ravg += times[x]/float(ravg_span)
hline (0, width - 1, average, blue)
hline (0, width - 1, 0, white)
vline (0, 0, height - 1, white)
for y in range (0, height - 1, 10):
hline (0, 3, y, white)
for x in range (0, width - 1, 100):
vline (x, 0, 3, white)
f = open ("timeframes.ppm", "wb")
f.write ("P6\n")
f.write ("#File written by timeframes.py\n")