Skip to content

Commit 2c618ea

Browse files
committed
Merge pull request glamp#14 from mc818/xlabels
modify x-label printouts
2 parents 6871f05 + e8aa977 commit 2c618ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bashplotlib/histogram.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ def calc_bins(n, min_val, max_val, h=None, binwidth=None):
1414
if binwidth is None:
1515
binwidth = (max_val - min_val) / h
1616
for b in drange(min_val, max_val, step=binwidth, include_stop=True):
17-
yield b
17+
if b.is_integer():
18+
yield int(b)
19+
else:
20+
yield b
1821

1922
def read_numbers(numbers):
2023
"read the input data in the most optimal way"

0 commit comments

Comments
 (0)