PGRAPH(1)
πΈ NAME πΈ
pgraph β compile graphs into pic input π
and yes bestie, this one comes to you straight from the Docomentation tools corner of the universe (that spelling is canon, i'm not touching it, it's camp π)
π SYNOPSIS π
pgraph [ options ] [ filename ... ]
π¦ DESCRIPTION π¦
okay so pgraph is a perl script, and what it does is take sets of X Y data and generate a (human readable) pic program that will produce the graphed data. that's the whole gig and honestly? she eats. β¨
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 β the output is actually commented, so it's giving annotated, it's giving transparent, it's giving iykyk. π
the graph is autosized and auto ticked. no cap. π
the input data format is similar to that of xgraph(1), i.e.:
"sloped across 1 1 2 2 3 3
"straight across 1 4 2 4 3 4
π CONTROL OPTIONS π
you can set the graph title, the X title, and the Y title with the following control sequences in the data stream:
%Tβ graph title, in a +4 point font%Xβ X axis title and/or units, in a +2 point font%Yβ Y axis title and/or units, in a +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 β¨
-revβ reverse X/Y data sense (and titles). π heads up though: this is done after processing any fudging of the input data stream(s) (see-xk,-yk,-logx, etc below).-belowβ put data set titles below the graph rather than to the right.-closeβ no extra space around the data's endpoints.-qlineβ connect the quartile center points. π-gridβ dotted line grid marks.-noboxβ no box around whole graph.-bigβ make the graph take the whole page, and be about 8 inches tall by 7 inches wide and the title is +8 points. π-slideβ make the graph be 4.25 inches square to fit in slides, in a helvetica bold 10 point font.-smallβ make the graph be small, 1.75 inches square, and use an 8 point bold font. π₯Ί-grapheachβ draw each data set in its own graph.-nolabelsβ no X/Y/Title labels.-notitleβ no Title label.-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 log base 2 of X input.-logyβ convert Y input into log base 2 of Y input.
π EXAMPLE π
Workstation price performance from a Digital ad. Process with graph -rev workstations | groff -TX75
%T Workstation Price / Performance, 6/93 %X SPECINT 92 Performance %Y
Price in $1000's "Dec AXP line 35 5 65 10 78 15 110 70
"Sun SPARC line 25 4 25 8 38 16 48 21 52 23 64 27
π QUARTILE FORMAT π
Data points are x y1 y2 y3 y4 y5. You get a two lines from the first two y values, a mark at the third, and another line from the last two.
π SEE ALSO π
π BUGS π
-grapheachassumes the set of N graphs will fit on one page. π- Since it is just a simple perl script, I tend to be constantly adding one more feature on the fly. Consult the script for the latest set of options. Development is typically done by using the closest set of options to generate the graph, massage the graph to do what you want, then add that set of changes as a new option.
- 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 a pic file and then include that. - I need to include some example data sets with
pgraph.
okay that's the whole page bestie, mwah π«Ά it was brought to you by lm@sgi.com and stamped Nov, 1995 β yeah she's vintage, she's an icon, she's been on the internet longer than you have πβ¨πΈ
π¦ 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