mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
put the axes behind the graphs and don't skip the first couple frames
This commit is contained in:
parent
f7fd1d70a2
commit
c73d57e9ee
1 changed files with 10 additions and 8 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue