From 81dd6517f104d95da0dea663af6b7852cfdb0aff Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Mon, 25 Sep 2023 10:09:33 -0500 Subject: [PATCH] Now produces beautiful graphs. --- bin/parseTest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/parseTest.py b/bin/parseTest.py index 966572955..5cdcd81d4 100755 --- a/bin/parseTest.py +++ b/bin/parseTest.py @@ -321,6 +321,7 @@ def ReportAsGraph(benchmarkDict, bar): # the space between groups is 1 EffectiveNumInGroup = NumberInGroup + 2 barWidth = 1 / EffectiveNumInGroup + colors = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'black', 'black', 'black', 'black', 'black', 'black'] for benchmarkName in benchmarkDict: currBenchmark = benchmarkDict[benchmarkName] xlabelList.append(benchmarkName) @@ -344,10 +345,13 @@ def ReportAsGraph(benchmarkDict, bar): xpos = [x + index*barWidth for x in xpos] values = seriesDict[name] print(f'xpos = {xpos}, values={values}') - plt.bar(xpos, values, width=barWidth, edgecolor='grey', label=name) + plt.bar(xpos, values, width=barWidth, edgecolor='grey', label=name, color=colors[index%len(colors)]) index += 1 plt.xticks([r + barWidth*(NumberInGroup/2-0.5) for r in range(0, testLimit)], xlabelList) - plt.legend() + plt.xlabel('Benchmark') + if(not args.invert): plt.ylabel('Misprediction Rate Accuracy (%)') + else: plt.ylabel('Prediction Accuracy (%)') + plt.legend(loc='upper left', ncol=2) plt.show()