More work to improve documentation generated by sphinx. Also fixes
[pyutils.git] / src / pyutils / typez / histogram.py
index 2887525b053991fcec299bc8f2fcf9b8a91fefa4..d0a755b3b572d46f0dbf407b4d87673db6bbc466 100644 (file)
@@ -3,7 +3,36 @@
 
 # © Copyright 2021-2022, Scott Gasch
 
-"""A text-based simple histogram helper class."""
+"""
+This is a text-based histogram class.  It creates output like this:
+
+A Histogram helper class.  Creates outputs like this::
+
+      [4..5): ▏                                                     ( 0.16% n=1)
+      [5..6): ██▍                                                   ( 0.64% n=4)
+      [6..7): ██████▏                                               ( 1.60% n=10)
+      [7..8): ████████████▍                                         ( 3.20% n=20)
+      [8..9): █████████████████████▊                                ( 5.60% n=35)
+     [9..10): ████████████████████████████████▍                     ( 8.32% n=52)
+    [10..11): ██████████████████████████████████████████▍           (10.88% n=68)
+    [11..12): █████████████████████████████████████████████████▉    (12.80% n=80)
+    [12..13): ████████████████████████████████████████████████████▉ (13.60% n=85)
+    [13..14): █████████████████████████████████████████████████▉    (12.80% n=80)
+    [14..15): ██████████████████████████████████████████▍           (10.88% n=68)
+    [15..16): ████████████████████████████████▍                     ( 8.32% n=52)
+    [16..17): █████████████████████▊                                ( 5.60% n=35)
+    [17..18): ████████████▍                                         ( 3.20% n=20)
+    [18..19): ██████▏                                               ( 1.60% n=10)
+    [19..20): ██▍                                                   ( 0.64% n=4)
+    [20..21): ▏                                                     ( 0.16% n=1)
+    --------------------------------------------------------------------------------
+     [4..21):                                                         pop(Σn)=625
+                                                                      mean(x̄)=12.000
+                                                                  median(p50)=12.000
+                                                                     mode(Mo)=12.000
+                                                                     stdev(σ)=0.113
+
+"""
 
 import math
 from dataclasses import dataclass