Fixes plot labels (slightly)
This commit is contained in:
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user