| Copyright | © 2018-2020 IOHK |
|---|---|
| License | MPL-2.0 |
| Stability | experimental |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Plot.Text.Histogram
Description
Plot Histogram as unicode strings; for terminal plotting.
For example, one could plot answers and their frequencies to the question:
"Who's your favorite metal band?"
plot $ Histogram
{ width = 80
, height = 24
, bins =
[ ( "Metallica", 78 )
, ( "Iron Maiden", 61 )
, ( "Slayer", 16 )
, ( "Dimmu Borgir", 3 )
, ( "Ghost", 48 )
]
}78 ┤┌─────────────┐
││ │
││ │
││ │
││ │
62 ┤│ │
││ ├─────────────┐
││ │ │
││ │ │
││ │ │
47 ┤│ │ │ ┌─────────────┐
││ │ │ │ │
││ │ │ │ │
││ │ │ │ │
││ │ │ │ │
31 ┤│ │ │ │ │
││ │ │ │ │
││ │ │ │ │
││ │ │ │ │
││ │ │ │ │
16 ┤│ │ ├─────────────┐ │ │
││ │ │ │ │ │
││ │ │ │ │ │
││ │ │ │ │ │
││ │ │ ├──────────────┤ │
Metallica Iron Maiden Slayer Dimmu Borgir Ghost