X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=histogram.py;h=ee1601a9c627fa430139772eeef84401ba4406f6;hb=3ca9b4d16433af8da5d2de7f4a2338b56b5428d5;hp=86d0493dc57e32056c4eb04ec4499992d365e542;hpb=02302bbd9363facb59c4df2c1f4013087702cfa6;p=python_utils.git diff --git a/histogram.py b/histogram.py index 86d0493..ee1601a 100644 --- a/histogram.py +++ b/histogram.py @@ -165,7 +165,7 @@ class SimpleHistogram(Generic[T]): some vital stats about the population in it (min, max, mean, median, mode, stdev, etc...) """ - from text_utils import bar_graph + from text_utils import BarGraphText, bar_graph_string details = self._get_bucket_details(label_formatter) txt = "" @@ -187,9 +187,10 @@ class SimpleHistogram(Generic[T]): if start < details.lowest_start: continue label = f'[{label_formatter}..{label_formatter}): ' % (start, end) - bar = bar_graph( - (pop / details.max_population), - include_text=False, + bar = bar_graph_string( + pop, + details.max_population, + text=BarGraphText.NONE, width=bar_width, left_end="", right_end="",