Also, if the input has values that are same, there is an error:
§ echo $'1 100\n2 100' | termgraph --histogram
Traceback (most recent call last):
File "/usr/local/bin/termgraph", line 10, in <module>
sys.exit(main())
File "/Library/Python/3.7/site-packages/termgraph/termgraph.py", line 130, in main
chart(colors, data, args, labels)
File "/Library/Python/3.7/site-packages/termgraph/termgraph.py", line 478, in chart
for row in hist_rows(data, args, colors):
File "/Library/Python/3.7/site-packages/termgraph/termgraph.py", line 217, in hist_rows
normal_counts = normalize(count_list, args["width"])
File "/Library/Python/3.7/site-packages/termgraph/termgraph.py", line 162, in normalize
norm_factor = width / float(max_datum)
ZeroDivisionError: float division by zero
Thanks for making this tool. I am not sure if this is a bug, or I am missing something, but I wanted to bring it up.
Shouldn't the values for each of the bins add up to 3 since there are 3 rows in the data?
Also, if the input has values that are same, there is an error: