From b53d5d147e6673072cb8e09d4d94fcc6e9e96b8b Mon Sep 17 00:00:00 2001 From: Colm Vize Date: Tue, 2 Sep 2014 18:32:48 +0100 Subject: [PATCH] Short fix to make x-labels align correctly with the buckets --- bashplotlib/histogram.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bashplotlib/histogram.py b/bashplotlib/histogram.py index e70bf85..6d16e35 100644 --- a/bashplotlib/histogram.py +++ b/bashplotlib/histogram.py @@ -165,7 +165,7 @@ def plot_hist(f, height=20.0, bincount=None, binwidth=None, pch="o", colour="def else: printcolour(" ", True, colour) print - xs = hist.keys() * 2 + xs = hist.keys() print " " * (nlen+1) + "-" * len(xs) @@ -175,8 +175,8 @@ def plot_hist(f, height=20.0, bincount=None, binwidth=None, pch="o", colour="def printcolour(" " * (nlen+1), True, colour) for x in range(0, len(hist)): num = str(bins[x]) - if x % 2 == 0: - print " ", + if x % 2 != 0: + pass elif i < len(num): print num[i], else: