aboutsummaryrefslogtreecommitdiff
path: root/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py7
1 files changed, 4 insertions, 3 deletions
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