stats2.py: adjust x-axis scale for arogue5 score chart.

The range of scores is higher.
This commit is contained in:
John "Elwin" Edwards 2014-01-10 09:03:16 -05:00
parent be7dba5b6c
commit 8516530580
2 changed files with 9 additions and 9 deletions

View file

@ -81,15 +81,19 @@ for game in rlgall.gamelist:
scoreblocks = range(10)
xlcounts = []
scorecounts = []
if isinstance(game, rlgall.ARogueGame):
scorewidth = 1500
else:
scorewidth = 1000
for xl in xls:
cur.execute(xlq, [xl])
xlcounts.append(cur.fetchone()[0])
for sn in scoreblocks:
lscore = sn * 1000
lscore = sn * scorewidth
if sn == 9:
hscore = 32000
hscore = scorewidth * 32
else:
hscore = (sn + 1) * 1000
hscore = (sn + 1) * scorewidth
cur.execute(scrq, (lscore, hscore))
scorecounts.append(cur.fetchone()[0])
xlgraph = open("{0}/xl-{1}.svg".format(svgpath, game.uname), "w")
@ -121,7 +125,7 @@ for game in rlgall.gamelist:
barh = round(scale * count)
bary = 550 - barh
scoregraph.write(barstr.format(75, barh, barx, bary))
scoregraph.write(xllabel.format(barx, block * 1000))
scoregraph.write(xllabel.format(barx, block * scorewidth))
for yl in range(scoredivs + 1):
labeln = int(scoremax * yl / scoredivs)
labelh = 550 + 8 - 500 * yl / scoredivs