Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ktorz/machination

Plot charts as unicode strings in the console.
https://github.com/ktorz/machination

console haskell histogram plot unicode

Last synced: 3 months ago
JSON representation

Plot charts as unicode strings in the console.

Awesome Lists containing this project

README

        


Machination

> A Haskell library for text plotting in the terminal.





## Overview

### Histograms

Plot [histograms](https://en.wikipedia.org/wiki/Histogram) as unicode strings in the console. For example, one could plot answers and their frequencies to the question:

_"Who's your favorite metal band?"_

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





:book: Documentation
|
:floppy_disk: Changelog