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
15
py/stats2.py
15
py/stats2.py
|
|
@ -143,9 +143,9 @@ def mkxlgraph(game, xldata):
|
||||||
|
|
||||||
def mkscoregraph(game, scoredata):
|
def mkscoregraph(game, scoredata):
|
||||||
if isinstance(game, rlgall.ARogueGame):
|
if isinstance(game, rlgall.ARogueGame):
|
||||||
scorewidth = 1500
|
|
||||||
else:
|
|
||||||
scorewidth = 1000
|
scorewidth = 1000
|
||||||
|
else:
|
||||||
|
scorewidth = 500
|
||||||
scoregraph = SVGChart("{0}/score-{1}.svg".format(svgpath, game.uname))
|
scoregraph = SVGChart("{0}/score-{1}.svg".format(svgpath, game.uname))
|
||||||
scoregraph.style("ffff00")
|
scoregraph.style("ffff00")
|
||||||
scoregraph.write(framerect)
|
scoregraph.write(framerect)
|
||||||
|
|
@ -156,11 +156,12 @@ def mkscoregraph(game, scoredata):
|
||||||
scale = 500 / scoremax
|
scale = 500 / scoremax
|
||||||
for block, count in scoredata:
|
for block, count in scoredata:
|
||||||
n = block // scorewidth
|
n = block // scorewidth
|
||||||
barx = n * 75 + 100
|
barx = n * 50 + 100
|
||||||
barh = scale * count
|
barh = scale * count
|
||||||
bary = 550 - barh
|
bary = 550 - barh
|
||||||
if count > 0:
|
if count > 0:
|
||||||
scoregraph.write(bar3d(barx, 75, barh))
|
scoregraph.write(bar3d(barx, 50, barh))
|
||||||
|
if n % 2 == 0:
|
||||||
scoregraph.write(xllabel.format(barx, block))
|
scoregraph.write(xllabel.format(barx, block))
|
||||||
for yl in range(scoredivs + 1):
|
for yl in range(scoredivs + 1):
|
||||||
labeln = int(scoremax * yl / scoredivs)
|
labeln = int(scoremax * yl / scoredivs)
|
||||||
|
|
@ -203,10 +204,10 @@ for game in rlgall.gamelist:
|
||||||
xldata = game.getXLCounts(15)
|
xldata = game.getXLCounts(15)
|
||||||
deepdata = game.getDepthCounts(30)
|
deepdata = game.getDepthCounts(30)
|
||||||
if isinstance(game, rlgall.ARogueGame):
|
if isinstance(game, rlgall.ARogueGame):
|
||||||
scorewidth = 1500
|
|
||||||
else:
|
|
||||||
scorewidth = 1000
|
scorewidth = 1000
|
||||||
scoredata = game.getScoreCounts(10, scorewidth)
|
else:
|
||||||
|
scorewidth = 500
|
||||||
|
scoredata = game.getScoreCounts(15, scorewidth)
|
||||||
mkxlgraph(game, xldata)
|
mkxlgraph(game, xldata)
|
||||||
mkscoregraph(game, scoredata)
|
mkscoregraph(game, scoredata)
|
||||||
mkdeepgraph(game, deepdata)
|
mkdeepgraph(game, deepdata)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue