Creating a dashed (or dotted) spline in groff's pic preprocessor...
As far as I know, "dashed" and "dotted" have never worked for splines in pic. However, you can force it (provided you are outputting to PostScript?) with an \X'ps: exec ... ' command.
Example (to produce a dashed spline):
.PS command "\X'ps: exec [3 5] 0 setdash'\c" spline from (0,0) to (1,0) to (2,1) to (2,2) to (1,3) to (0,2) command "\X'ps: exec [] 0 setdash'\c" circle rad 0.1 at (0,0) circle rad 0.1 at (1,0) circle rad 0.1 at (2,1) circle rad 0.1 at (2,2) circle rad 0.1 at (1,3) circle rad 0.1 at (0,2) line from (0,0) to (1,0) to (2,1) to (2,2) to (1,3) to (0,2) .PE
There's no PS command for dotted lines as such, but you can emulate it by changing the parameters to "setdash": e.g. try
command "\X'ps: exec [0.25 1.5] 0 setdash'\c"
in place of the above. (The first number in [ ] gives the length of the dash, the second the spacing between dashes, and the number following gives the "offset" along the path at which it starts obeying the pattern).
For more general use, you'll need to read up about "setdash" in the PostScript? Reference Manual (a bit complicated to explain here).
oe: I found a good reference at http://www.capcode.de/help/setdash
Back to: GroffTips