Machination
A Haskell library for text plotting in the terminal.
Overview
Histograms
Plot histograms as unicode strings in the console. For example, one could plot answers and their frequencies to the question:
"Who's your favorite metal band?"
import Prelude
import Plot.Text.Histogram
( Histogram (..), plot )
main :: IO ()
main = putStrLn $ do
plot $ Histogram
{ width = 80
, height = 24
, bins =
[ ( "Metallica", 78 )
, ( "Iron Maiden", 61 )
, ( "Slayer", 16 )
, ( "Dimmu Borgir", 3 )
, ( "Ghost", 48 )
]
}