Reduce the score graphs' column widths.
More and narrower categories bring out more detail.
This commit is contained in:
parent
865e2f3be3
commit
8fc67392d9
1 changed files with 9 additions and 8 deletions
17
py/stats2.py
17
py/stats2.py
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue