Reduce the score graphs' column widths.

More and narrower categories bring out more detail.
This commit is contained in:
John "Elwin" Edwards 2015-01-21 10:45:00 -05:00
parent 865e2f3be3
commit 8fc67392d9

View file

@ -143,9 +143,9 @@ def mkxlgraph(game, xldata):
def mkscoregraph(game, scoredata):
if isinstance(game, rlgall.ARogueGame):
scorewidth = 1500
else:
scorewidth = 1000
else:
scorewidth = 500
scoregraph = SVGChart("{0}/score-{1}.svg".format(svgpath, game.uname))
scoregraph.style("ffff00")
scoregraph.write(framerect)
@ -156,12 +156,13 @@ def mkscoregraph(game, scoredata):
scale = 500 / scoremax
for block, count in scoredata:
n = block // scorewidth
barx = n * 75 + 100
barx = n * 50 + 100
barh = scale * count
bary = 550 - barh
if count > 0:
scoregraph.write(bar3d(barx, 75, barh))
scoregraph.write(xllabel.format(barx, block))
scoregraph.write(bar3d(barx, 50, barh))
if n % 2 == 0:
scoregraph.write(xllabel.format(barx, block))
for yl in range(scoredivs + 1):
labeln = int(scoremax * yl / scoredivs)
labelh = 550 + 8 - 500 * yl / scoredivs
@ -203,10 +204,10 @@ for game in rlgall.gamelist:
xldata = game.getXLCounts(15)
deepdata = game.getDepthCounts(30)
if isinstance(game, rlgall.ARogueGame):
scorewidth = 1500
else:
scorewidth = 1000
scoredata = game.getScoreCounts(10, scorewidth)
else:
scorewidth = 500
scoredata = game.getScoreCounts(15, scorewidth)
mkxlgraph(game, xldata)
mkscoregraph(game, scoredata)
mkdeepgraph(game, deepdata)