machination

Plot charts as unicode strings in the console.


Keywords
mpl, plotting, Propose Tags , Plot.Text.Histogram, console, haskell, histogram, plot, unicode
License
MPL-2.0
Install
cabal install machination

Documentation

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 )
            ]
        }


📖 Documentation | 💾 Changelog