#
source:
trunk/third/transcript/lib/psplot.pro
@
9090

Revision 9090, 2.3 KB checked in by ghudson, 28 years ago (diff) |
---|

Line | |
---|---|

1 | % Start of psplot.pro -- prolog for plot(5) translator |

2 | % Copyright (c) 1984,1985,1987 Adobe Systems Incorporated. All Rights Reserved. |

3 | % RESTRICTED RIGHTS LEGEND |

4 | % Use, duplication or disclosure by the Government is subject to |

5 | % restrictions as set forth in subdivision (b)(3)(ii) of the Rights in |

6 | % Technical Data and Computer Software Clause at 252.227-7013. |

7 | % Name of Contractor: Adobe Systems Incorporated |

8 | % Address: 1870 Embarcadero Road |

9 | % Palo Alto, California 94303 |

10 | % RCS: $Header: /afs/dev.mit.edu/source/repository/third/transcript/lib/psplot.pro,v 1.1.1.1 1996-10-07 20:25:32 ghudson Exp $ |

11 | save 50 dict begin /psplot exch def |

12 | /StartPSPlot |

13 | {newpath 0 0 moveto 0 setlinewidth 0 setgray 1 setlinecap |

14 | /imtx matrix currentmatrix def /dmtx matrix defaultmatrix def |

15 | /fnt /Courier findfont def /smtx matrix def fnt 8 scalefont setfont}def |

16 | /solid {{}0}def |

17 | /dotted {[2 nail 10 nail ] 0}def |

18 | /longdashed {[10 nail] 0}def |

19 | /shortdashed {[6 nail] 0}def |

20 | /dotdashed {[2 nail 6 nail 10 nail 6 nail] 0}def |

21 | /disconnected {{}0}def |

22 | /min {2 copy lt{pop}{exch pop}ifelse}def |

23 | /max {2 copy lt{exch pop}{pop}ifelse}def |

24 | /len {dup mul exch dup mul add sqrt}def |

25 | /nail {0 imtx dtransform len 0 idtransform len}def |

26 | |

27 | /m {newpath moveto}def |

28 | /n {lineto currentpoint stroke moveto}def |

29 | /p {newpath moveto gsave 1 setlinecap solid setdash |

30 | dmtx setmatrix .4 nail setlinewidth |

31 | .05 0 idtransform rlineto stroke grestore}def |

32 | /l {moveto lineto currentpoint stroke moveto}def |

33 | /t {smtx currentmatrix pop imtx setmatrix show smtx setmatrix}def |

34 | /a {gsave newpath /y2 exch def /x2 exch def |

35 | /y1 exch def /x1 exch def /yc exch def /xc exch def |

36 | /r x1 xc sub dup mul y1 yc sub dup mul add sqrt |

37 | x2 xc sub dup mul y2 yc sub dup mul add sqrt add 2 div def |

38 | /ang1 y1 yc sub x1 xc sub atan def |

39 | /ang2 y2 yc sub x2 xc sub atan def |

40 | xc yc r ang1 ang2 arc stroke grestore}def |

41 | /c {gsave newpath 0 360 arc stroke grestore}def |

42 | /e {gsave showpage grestore newpath 0 0 moveto}def |

43 | /f {load exec setdash}def |

44 | /s {/ury exch def /urx exch def /lly exch def /llx exch def |

45 | imtx setmatrix newpath clippath pathbbox newpath |

46 | /dury exch def /durx exch def /dlly exch def /dllx exch def |

47 | /md durx dllx sub dury dlly sub min def |

48 | /Mu urx llx sub ury lly sub max def |

49 | dllx dlly translate md Mu div dup scale llx neg lly neg translate}def |

50 | /EndPSPlot {clear psplot end restore}def |

**Note:**See TracBrowser for help on using the repository browser.