Skip to content

Commit

Permalink
Update plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JakkuSakura committed Sep 25, 2020
1 parent 1df5d0a commit 95ba335
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crossbeam-channel/benchmarks/plot.py
Expand Up @@ -105,12 +105,13 @@ def plot(results, fig, subplot, title, prefix):
scores[name][find(runs, test)] = secs

opts = dict(height=0.8, align='center')
x_max = max(max(scores.values(), key=lambda x: max(x)))
for i, (name, score) in enumerate(scores.items()):
yy = [y + i - len(runs) // 2 + 0.2 for y in ys]
ax.barh(yy, score, color=get_color(name), **opts)
for xxx, yyy in zip(score, yy):
if xxx:
ax.text(xxx, yyy - 0.25, name, fontsize=9)
ax.text(min(x_max - len(name) * 0.018 * x_max, xxx), yyy - 0.25, name, fontsize=9)


def plot_all(results, descriptions, labels):
Expand Down

0 comments on commit 95ba335

Please sign in to comment.