Table of Contents
graph - compile graphs into pic input
graph [ options ] [ filename
graph is a perl script which takes sets of X Y data and generates
a (human readable) pic program that will produce the graphed data. The
output is designed such that you can save it in a file and tweak it to
make it fit your document. Try one and look at the output. The output is
The graph is autosized and auto ticked.
The input data
format is similar that of xgraph(1)
You may set the graph title, the X title, and the Y title
with the following control sequences in the data stream:
%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
price performance from a Digital ad. Process with
- 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
- put data set titles below the graph rather than to the right.
- no extra space around the data’s endpoints.
- connect the quartile
- dotted line grid marks.
- no box around whole graph.
- make the graph take the whole page.
- make the graph take about 1/2
- make the graph be small.
- draw each data set in its
- no X/Y/Title labels.
- no data set labels.
not mark each data point with distinct markers (endpoints are still marked).
- print values larger than 1000 as value/1000.
- multiply X input by 1024
- multiply Y input by 1024 (blech).
- multiply X input by 1024*1024
- multiply Y input by 1024*1024 (blech).
- convert X input into
lag base 2 of X input.
- convert Y input into lag base 2 of Y input.
graph -rev workstations | groff -TX75
"%T Workstation Price / Performance, 6/93
"%X SPECINT 92 Performance
"%Y Price in $1000’s
"Dec AXP line
"Sun SPARC line
Data points are CBx 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.
This should probably
be called pic_graph or something like that.
This isn’t done as much as I
would like. It isn’t integrated with the groff preprocessor yet. It doesn’t
know about .GS/.GE things. I use it to manually generate a pic file and then
Table of Contents