GRAPH(1)
π GRAPH(1) π
okay bestie, welcome to graph, from the General Commands Manual, section 1, no cap. sit down, hydrate, let's get into it π«Ά
β¨ NAME β¨
graph β compile graphs into pic input. that's it, that's the job, and she does it flawlessly π
β¨ SYNOPSIS β¨
graph [ options ] [ filename ... ]
β¨ DESCRIPTION β¨
so graph is a perl script, right? she takes sets of X Y data and generates a (human readable) pic program that will produce the graphed data. the way she's set up?? the output is designed so you can save it in a file and tweak it to make it fit your document. literally just try one and look at the output. it's giving transparency because β plot twist β the output is actually commented. iconic behaviour tbh π
and the graph is autosized and auto ticked. no manual labour, we don't do that here β¨
the input data format is similar to that of xgraph(1), i.e.:
1 1 2 2 3 3 "sloped across
1 4 2 4 3 4 "straight across
β¨ CONTROL OPTIONS β¨
you can set the graph title, the X title, and the Y title with these little control sequences in the data stream, and honestly? obsessed π
%Tβ graph title, in +4 point font%Xβ X axis title and/or units, in +2 point font%Yβ Y axis title and/or units, in +2 point font%fakemax-X <value>β force graph to be that big%fakemax-Y <value>β force graph to be that big%fakemin-X <value>β force graph to be that small%fakemin-Y <value>β force graph to be that small
β¨ OPTIONS β¨
every single one, bestie, no skipping, we're thorough in this house π
-revβ reverse X/Y data sense (and titles). β οΈ note this is done after processing any fudging of the input data stream(s) (see-xk,-yk,-logx, etc below). order matters, periodt.-belowβ put data set titles below the graph rather than to the right.-closeβ no extra space around the data's endpoints. cozy vibes, zero personal space π«-qlineβ connect the quartile center points.-gridβ dotted line grid marks. aesthetic β¨-noboxβ no box around the whole graph. she's free, she's uncontained π¦-bigβ make the graph take the whole page. main character energy, honestly π-mediumβ make the graph take about 1/2 the page.-smallβ make the graph be small. tiny. smol. π-grapheachβ draw each data set in its own graph.-nolabelsβ no X/Y/Title labels.-nodatalβ no data set labels.-nomarksβ do not mark each data point with distinct markers (endpoints are still marked).-kβ print values larger than 1000 as value/1000.-xkβ multiply X input by 1024 (blech).-ykβ multiply Y input by 1024 (blech).-xmβ multiply X input by 1024*1024 (blech).-ymβ multiply Y input by 1024*1024 (blech).-logxβ convert X input into lag base 2 of X input.-logyβ convert Y input into lag base 2 of Y input.
β¨ EXAMPLE β¨
workstation price performance from a Digital ad. process with:
graph -rev workstations | groff -TX75
and here's the data, bestie:
"%T Workstation Price / Performance, 6/93
"%X SPECINT 92 Performance
"%Y Price in $1000's
35 5
65 10
78 15
110 70
"Dec AXP line
25 4
25 8
38 16
48 21
52 23
64 27
"Sun SPARC line
β¨ QUARTILE FORMAT β¨
data points are x y1 y2 y3 y4 y5. you get two lines from the first two y values, a mark at the third, and another line from the last two. that's the whole vibe check, iykyk πΈ
β¨ SEE ALSO β¨
β¨ BUGS β¨
okay so, keeping it real π:
- this should probably be called
pic_graphor something like that. - this isn't done as much as I would like. it isn't integrated with the
groffpreprocessor yet. it doesn't know about.GS/.GEthings. I use it to manually generate apicfile and then include that.
and that's the whole page, bestie π she's from the General Commands Manual, section 1 β GRAPH(1) β and yes, this is the end of the page, no more content after this, slay β¨ππ
π¦ 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