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

View file

@ -26,15 +26,11 @@ of historical roguelikes is being restored and made available for play on this s
<li><a href="/archive.cgi">ttyrec files</a></li> <li><a href="/archive.cgi">ttyrec files</a></li>
</ul> </ul>
<h2>News</h2> <h2>News</h2>
<p><strong>Jan. 10, 2014</strong>: Statistical charts have been added to the <a href="/scoring/">scores section</a>.</p>
<p><strong>Oct. 5, 2013</strong>: All the games have been updated to fix various bugs. Super-Rogue now supports arrow keys. Games can be <a href="/download.html">downloaded</a>.</p> <p><strong>Oct. 5, 2013</strong>: All the games have been updated to fix various bugs. Super-Rogue now supports arrow keys. Games can be <a href="/download.html">downloaded</a>.</p>
<p><strong>Sep. 15, 2012</strong>: <a href="about/arogue5.html">Advanced Rogue 5</a> is available to play, in time for the Annual Roguelike Release Party. The Web app has been updated too.</p> <p><strong>Sep. 15, 2012</strong>: <a href="about/arogue5.html">Advanced Rogue 5</a> is available to play, in time for the Annual Roguelike Release Party. The Web app has been updated too.</p>
<p><strong>Aug. 19, 2012</strong>: The upgrade is complete, games are back online. Watch for more changes.</p> <p><strong>Aug. 19, 2012</strong>: The upgrade is complete, games are back online. Watch for more changes.</p>
<p><strong>Jul. 27, 2012</strong>: The latency problems with the Web player should be resolved now.</p> <p><strong>Jul. 27, 2012</strong>: The latency problems with the Web player should be resolved now.</p>
<p><strong>Jun. 30, 2012</strong>: I've fixed a bug that prevented new accounts from being created.</p>
<p><strong>Jun. 27, 2012</strong>: A <a href="tourn32.html">tournament</a> is being planned!</p>
<p><strong>Jun. 24, 2012</strong>: It is now possible to <a href="http://rlgallery.org:8080/">play in your browser</a>, without needing any other software.</p>
<p><strong>Feb. 2, 2012</strong>: Everything should be recovered from the failed upgrade. Please report any problems.</p>
<p><strong>Feb. 4, 2011</strong>: Some updates to the website. The <a href="/archive.cgi">ttyrec finder</a> is now usable.</p>
</div> </div>
<div class="foot"><a href="/">rlgallery.org</a> <a href="/recent.cgi">Recent Games</a> <a href="/scoring/high.cgi">High Scores</a></div> <div class="foot"><a href="/">rlgallery.org</a> <a href="/recent.cgi">Recent Games</a> <a href="/scoring/high.cgi">High Scores</a></div>
</body> </body>