Skip to content

Commit

Permalink
added value_labels()
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Jan 14, 2017
1 parent 6764d71 commit d0f47a4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions module/benchpress/grapher/bar_per_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
import json
import re

def value_labels(ax, rects):
for rect in rects:
height = rect.get_height()
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
'%.2f' % float(height),
ha='center', va='bottom')

def plot(cmds, res, baseline, args):

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -63,6 +70,10 @@ def plot(cmds, res, baseline, args):
shadow=True,
columnspacing=1)

# Now make some labels
value_labels(ax, ax.patches)


def get_stack_name(stack):
names = [comp[0] for comp in stack][1:]
ret = ""
Expand Down

0 comments on commit d0f47a4

Please sign in to comment.