diff options
author | Josh Blum | 2013-01-14 01:32:29 -0800 |
---|---|---|
committer | Josh Blum | 2013-01-14 01:32:29 -0800 |
commit | a68fb31076df0707b01212038525b9741ab27366 (patch) | |
tree | 93471da7df01e9577c3041a04766e753e1092787 /benchmark/run_benchmarks.py | |
parent | 0c8dc58819a931f81769e36f658d73611aba86a9 (diff) | |
download | sandhi-a68fb31076df0707b01212038525b9741ab27366.tar.gz sandhi-a68fb31076df0707b01212038525b9741ab27366.tar.bz2 sandhi-a68fb31076df0707b01212038525b9741ab27366.zip |
benchmark: added legend for description
Diffstat (limited to 'benchmark/run_benchmarks.py')
-rw-r--r-- | benchmark/run_benchmarks.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/benchmark/run_benchmarks.py b/benchmark/run_benchmarks.py index 5405677..fb525a2 100644 --- a/benchmark/run_benchmarks.py +++ b/benchmark/run_benchmarks.py @@ -72,13 +72,20 @@ def do_a_benchmark(bm): rects = ax.bar(ind, bogomips, width, color='blue', yerr=bogomips_dev, error_kw=dict(elinewidth=6, ecolor='pink'), + label=bm['moar'] ) ax.set_xlim(-width, max(len(ind), 4)) - ax.set_ylim(0, max(*bogomips) + max(*bogomips_dev)*3) + ax.set_ylim(0, max(*bogomips)*1.1 + max(*bogomips_dev)*2) for rect in rects: height = rect.get_height() ax.text(rect.get_x()+rect.get_width()/2.0, 1.01*height, '%.3f'%height, horizontalalignment='center') ax.grid(True) + + fontP = FontProperties() + fontP.set_size('small') + handles, labels = ax.get_legend_handles_labels() + ax.legend(handles, labels, prop=fontP, loc="upper right") + print '\n' return fig |