[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] dynamic grap ticks
From: |
James K. Lowden |
Subject: |
[Groff] dynamic grap ticks |
Date: |
Sat, 27 Apr 2013 00:25:51 -0400 |
Is there's a cool way to pass "sh" output to grap's ticks command?
I'd like to generate my x-axis "ticks" programatically, from the
data I'm bringing in with "copy". I have a line like this:
ticks bottom out at 6.40000000e+01 "\s-1%.0f", 9.05096680e+01 "%.0f", \
1.28000000e+02 "%.0f", 1.81019336e+02 "%.0f", 2.56000000e+02 "%.0f", \
3.62038672e+02 "%.0f", 5.12000000e+02 "%.0f", 7.24077344e+02 "%.0f", \
1.02400000e+03 "%.0f", 1.44815469e+03 "%.0f", 2.04800000e+03 "%.0f", \
2.89630938e+03 "%.0f", 4.09600000e+03 "%.0f", 5.79261875e+03 "%.0f", \
8.19200000e+03 "%.0f\s+1"
which came from the first column of the data file. I tried many
variations of
ticks sh { awk ... }
without any luck. (Even less luck because there doesn't seem to be a
way to escape the "$1" I would like to pass to awk.)
While I'm in the neighborhood, the grap manual says that labels stack,
but mine (version 1.41) doesn't seem to:
$ cat t
.G1
label top "abc", "def"
.G2
$ grap t
grap: syntax error
Error near line 2, file "t"
context is:
label top "abc" >>> , <<< "def"
Many thanks for any assistance.
--jkl
- [Groff] dynamic grap ticks,
James K. Lowden <=