[comp.lang.postscript] PostScript Toolset: X-Y coordinates Graph.ps

cramer@optilink.UUCP (Clayton Cramer) (08/30/89)

%!
/Graph
    {% graph (first X, first Y, end X, end Y, X line width, Y line width, 
     %        X gray, Y gray, X to X distance, Y to Y distance
    /YGap exch def /XGap exch def /YDensity exch def /XDensity exch def
    /YWidth exch def /XWidth exch def
    /YEnd exch def /XEnd exch def /YStart exch def /XStart exch def
    XWidth setlinewidth XDensity setgray
    XStart XGap XEnd {dup YStart moveto YEnd lineto stroke} for
    YWidth setlinewidth YDensity setgray
    YStart YGap YEnd {dup XStart exch moveto XEnd exch lineto stroke} for
    } def
%%DEMO
/in {72 mul} def
20 20 8.5 in 11 in 0 0 0 0 .05 in .05 in Graph 
1 setlinewidth 
20 20 moveto /Times-Roman findfont 800 scalefont setfont 
(T) false charpath stroke showpage
-- 
Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
"No man is an island" is the beginning of the end of personal freedom.
----------------------------------------------------------------------------
Disclaimer?  You must be kidding!  No company would hold opinions like mine!