From 9565a153a178e8143f3d44248c399a89462e33df Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 22 Jul 2019 22:36:23 -0400 Subject: move reverse from run.rb to plot.py --- plot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plot.py') diff --git a/plot.py b/plot.py index 31262c3..dcbb714 100755 --- a/plot.py +++ b/plot.py @@ -19,14 +19,15 @@ if len(sys.argv) < 2: # decode json data from first argument data = json.loads(sys.argv[1]) +rows = data['rows'][::-1] # plot values plt.barh( - np.arange(len(data['rows'])), - [row[1] for row in data['rows']], + np.arange(len(rows)), + [row[1] for row in rows], align = 'center', alpha = 0.5, - tick_label = [row[0] for row in data['rows']] + tick_label = [row[0] for row in rows] ) # set plot parameters -- cgit v1.2.3