BRAILLEGRAPH(1)

πŸ“¦
version 0.3 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸŽ€ NAME πŸŽ€

braillegraph β€” bestie, it's a simple histogram tool that produces text output ✨


πŸ’… SYNOPSIS πŸ’…

braillegraph <data series

psql -At -c 'select ...' |braillegraph

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so braillegraph takes a single data series and plots them, and the way it does it is genuinely unhinged: it abuses the Braille range (U+2800..U+28FF) πŸ’€ it's giving "no thoughts, just dots" but make it genius.

here's the tea β€” it's able to display two values per a horizontal character, which means a plain text mail can hold an X range up to ~150 data points 🌈 The vertical resolution is 4/character, so a reasonable Y range is up to 80ish πŸ‘‘

By default, no scaling is done at all β€” one dot is exactly one data point horizontally, a value of 1 vertically. lowkey the most honest graph you'll ever meet πŸ’–

Input is given as one non-negative integer per line. that's it, that's the whole vibe.


🌸 EXAMPLE 🌸

psql bugs -A -t -c "
select
    count(case when arch='amd64 (x86_64)' then 1 else null end)
    *80/count(*)
from (select arch, date_trunc('month', timestamp) as month from si) m
group by month
order by month
"|braillegraph

✨ OPTIONS ✨

  • -h, --horizontal β€” Horizontal layout πŸ’« The Y axis is left-to-right, X axis is top-to-bottom. it's the same graph, just doing a lil rotate, main character energy.
  • -m, --max number β€” Force the target range of the data 🎯 Normally, the histogram will be auto-sized based on the largest value in the input; this option sets the max to a fixed value. It will result either in empty space on the graph or in values over the limit being hard-capped πŸ™ˆ

You typically want this option when comparing multiple histograms, or when continuously updating the display. fr fr, it's the "keep it consistent bestie" flag.

  • -y, --y-scale number β€” Scale the data so that the graph takes a given size (measured in dots) instead of varying on the data given πŸ“ The size in characters is ΒΌ the dot size on a vertical graph, Β½ on horizontal. math is mathing, and it's mathing precisely.

πŸ’€ CAVEATS πŸ’€

Versions of FreeFont older than end of 2016 make any Braille glyphs (both for legitimate uses and for brailleimg) totally unreadable at pixel sizes commonly found in computer displays β€” ie, anything but HiDPI and/or very large text sizes 😭 Alas, this font is commonly configured as primary fallback in default setups shipped by distributions. so if your graph looks like soup, it's not you, it's the font, periodt.


πŸ‘‘ AUTHOR πŸ‘‘

Adam Borowski <kilobyte@angband.pl>


and that's the whole page bestie 🫢 this iconic lil manual is the braillegraph page, dated 2021-08-22 β€” go plot something pretty, you got this πŸ’–βœ¨

πŸ“¦ where this page comes from