#!/usr/bin/env python # a bar plot with errorbars import numpy as np import matplotlib.pyplot as plt import sys from pylab import * def rcolor(): return 'b' return tuple(np.random.rand(3)) from build_csv import build_results results = build_results(sys.argv[1]) # dict task -> impl -> time for task in results: print task fig = plt.figure() ax = fig.add_subplot(111) width = 0.30 # the width of the bars scores = [(s,i) for (i,s) in results[task].items()] scores.sort() scores = scores[-8:] rect = ax.barh(-.15+np.arange(len(scores)), [s for (s,i) in scores], 0.3, # width
#!/usr/bin/env python # a bar plot with errorbars import numpy as np import matplotlib.pyplot as plt import sys from pylab import * def rcolor(): return 'b' return tuple(np.random.rand(3)) from build_csv import build_results results = build_results(sys.argv[1]) # dict task -> impl -> time for task in results: print task fig = plt.figure() ax = fig.add_subplot(111) width = 0.30 # the width of the bars scores = [(s, i) for (i, s) in results[task].items()] scores.sort() scores = scores[-8:] rect = ax.barh( -.15 + np.arange(len(scores)),
#!/usr/bin/env python import os import sys from build_csv import build_results if __name__ == '__main__': r = build_results(sys.argv[1]) keys = r.keys() keys.sort() for k in keys: v = r[k] print k r_k = [(v[i],i) for i in v] r_k.sort() r_k.reverse() for t, i in r_k: print " %10.2f - %s" %(t, i) print ''
#!/usr/bin/env python import os import sys from build_csv import build_results if __name__ == '__main__': r = build_results(sys.argv[1]) keys = r.keys() keys.sort() for k in keys: v = r[k] print k r_k = [(v[i], i) for i in v] r_k.sort() r_k.reverse() for t, i in r_k: print " %10.2f - %s" % (t, i) print ''