Mercurial > hg > rlgallery-misc
changeset 60:876786c55450
Reduce the score graphs' column widths.
More and narrower categories bring out more detail.
author | John "Elwin" Edwards |
---|---|
date | Wed, 21 Jan 2015 10:45:00 -0500 |
parents | 0037de90af8b |
children | 5b4ff5680037 |
files | py/stats2.py |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/py/stats2.py Wed Jan 14 10:21:10 2015 -0500 +++ b/py/stats2.py Wed Jan 21 10:45:00 2015 -0500 @@ -143,9 +143,9 @@ def mkscoregraph(game, scoredata): if isinstance(game, rlgall.ARogueGame): - scorewidth = 1500 + scorewidth = 1000 else: - scorewidth = 1000 + scorewidth = 500 scoregraph = SVGChart("{0}/score-{1}.svg".format(svgpath, game.uname)) scoregraph.style("ffff00") scoregraph.write(framerect) @@ -156,12 +156,13 @@ 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 @@ xldata = game.getXLCounts(15) deepdata = game.getDepthCounts(30) if isinstance(game, rlgall.ARogueGame): - scorewidth = 1500 + scorewidth = 1000 else: - scorewidth = 1000 - scoredata = game.getScoreCounts(10, scorewidth) + scorewidth = 500 + scoredata = game.getScoreCounts(15, scorewidth) mkxlgraph(game, xldata) mkscoregraph(game, scoredata) mkdeepgraph(game, deepdata)