BARGRAPH(1)
β¨ NAME β¨
bargraph β compile bar graphs into pic input π
πΈ SYNOPSIS πΈ
bargraph [ filename ... ]
π DESCRIPTION π
So bargraph is a perl script bestie β you hand it a bunch of Y data with labels attached, and it hands you back a (human readable!!) pic script that draws the bar graph for you. Iconic. π
The pic input it spits out is commented, and it's built on purpose so that you can literally just go in there and tweak it to fit your document if you need to. It's giving β¨customizableβ¨.
The input data format is:
3 foo bar
9 bigger foo
"Silly example
and the output is like:
bigger
foo
+----------+
| |
foo | |
bar | |
+----------+ | |
| | | |
+----------+ +----------+
-------------------------------
3 9
Silly example
π OPTIONS π
Here's what you can throw on the command line, bestie:
-bigβ makes the x/y defaults be7.5inches, cranks up the title size, and skips the spacer at the top. Use this one when you're printing a graph across a whole entire full page πβ¨-noboxβ no outline box around the bargraph. Naked graph. Free the bars π
π CONTROL OPTIONS π
These ones live inside the graph to control how it's formatted. Important: they must be at the beginning of a line and by themselves. No sneaking them in mid-line, okay?
%ps <ps>β point size. Default is10.%ft <ft>β font. Default isCB.%labelgap <val>β the space in inches between fill labels. The bars can be filled with different fill values (no patterns yet though βpicdoesn't do that, rip). If you wanna label those, the labels end uplabelgapinches apart. Default is1.5inches.%xsize <val>β the width of the graph, in inches. Default is7inches.%ysize <val>β the height of the graph, in inches. Default is6inches.%Title n|s <title>β the title of the bargraph. The title option gets followed by a"n"orth (top) or"s"outh (bottom) indicator, and that controls where the title gets placed. No default. π%titleplus <val>β bumps up the size of the title in pointsize. Default is0.%boxpercent <val>β a value between0and100that controls how close the bars sit to each other. A value of100means the bars touch. Default is75.%worse <D> <W>β draws an idiot arrow π pointing at which way is worse.<D>is the direction and it must be"up"or"down".<W>is the location specifier and it must be one of"n"orth,"w"est,"e"ast,"s"outh,"nw"northwest,ne,sw,se, etc.%better <D> <W>β draws an idiot arrow pointing at which way is better.<D>is the direction and it must be"up"or"down".<W>is the location specifier and it must be one of"n"orth,"w"est,"e"ast,"s"outh,"nw"northwest,ne,sw,se, etc.%fakemaxβ pretends one data point was this big when it's autoscaling. This is the move when you want a whole series of bargraphs to all be drawn to the same scale. Lowkey genius π§
π¦ FILL CONTROL π¦
Each datum can be followed by a fill specifier, like this:
3 foo bar %fill.5
And labels? Labels let you group together a set of data that all have the same data. If a line shows up looking like:
%label.5 The foo bar data
then you get a label sitting below the graph. Cute, right? π
π SEE ALSO π
π TODO π
- Make a
-horizontaloption that prints the graphs the other way. (Please. π) - Hack
pickto get access to postscripts stipple patterns.
π BUGS π
Okay so this isn't done. Not even a little. It isn't integrated with the groff preprocessor yet, and it doesn't know about .GS/.GE thingys. The author uses it to manually generate a pic file and then includes that. And they still have to talk to James to see if he even wants it as part of the gpic stuff. So like... it works, but it's giving work in progress energy π
And that's the whole page, bestie! π«Ά This one's filed under bargraph(1) in the General Commands Manual β no date stamp on it, it's just out here living its truth, timeless icon behavior πβ¨
π¦ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms