Fixes plot labels (slightly)

This commit is contained in:
LSaldyt
2017-09-29 16:59:26 -06:00
parent fa8b493948
commit 6b1c4634fe

View File

@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
def plot_answers(answers, show=True, save=True, filename='distribution.png'):
answers = sorted(answers.items(), key=lambda kv : kv[1]['count'])
objects = [t[0] + ' (temp:{})'.format(t[1]['avgtemp']) for t in answers]
objects = [t[0] + ' (temp:{})'.format(round(t[1]['avgtemp'], 2)) for t in answers]
yvalues = [t[1]['count'] for t in answers]
y_pos = np.arange(len(objects))