home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / 14 / plots.f < prev    next >
Encoding:
Text File  |  1990-07-13  |  2.0 KB  |  97 lines

  1.     subroutine plots (idum, jdum, kdum)
  2.     integer           idum, jdum, kdum
  3. C
  4. C   Plotter initialisation routine - must be called before any other plotter
  5. C     calls are made
  6. C
  7. C   Where:
  8. C     idum, jdum, kdum = dummy variables for compatibility
  9. C
  10.  
  11.     common /cqpbnf/ xold, yold, fac, ires
  12.     save   /cqpbnf/
  13.     real            xold, yold, fac
  14.     integer                          ires
  15.  
  16.     logical first
  17.     save    first
  18.     data    first /.true./
  19.  
  20. C
  21. C   Initialise plot storage - if we haven't already
  22. C
  23.     if (first) then
  24.         first = .false.
  25.         call plbegn
  26. C
  27. C       Scale, rotate and translate PostScript output
  28. C         Units of pixels (300/inch for most laser printers)
  29. C         Origin in lower left corner, landscape mode
  30. C
  31.         call plsout ("72 300 div dup scale\n")
  32.         call plsout ("90 rotate\n")
  33.         call plsout ("75 -2460 translate\n")
  34.         call plsout ("0 0 moveto\n")
  35. C
  36. C       Set other line drawing parameters
  37. C
  38.         call plsout ("1 setlinewidth\n")
  39.         call plsout ("1 setlinejoin\n")
  40.         call plsout ("1 setlinecap\n")
  41. C
  42. C    Speed up symbol font handling
  43. C
  44.         call plsout ("/SF /Courier findfont def\n")
  45. C
  46. C       Set up definitions for other routines:
  47. C
  48. C      Move
  49. C
  50.         call plsout ("/M /moveto load def\n")
  51. C
  52. C      Relative Move
  53. C
  54.         call plsout ("/RM /rmoveto load def\n")
  55. C
  56. C      Draw
  57. C
  58.         call plsout ("/D {lineto currentpoint stroke moveto} def\n")
  59. C
  60. C      Special support for dgxplt
  61. C
  62.         call plsout ("/L /lineto load def\n")
  63. C
  64. C      Set new origin
  65. C
  66.         call plsout ("/O {currentpoint translate} def\n")
  67. C
  68. C      Set new linewidth
  69. C
  70.         call plsout ("/W {currentpoint stroke moveto setlinewidth} def\n")
  71. C
  72. C      Set character height
  73. C
  74.         call plsout ("/H {SF exch scalefont setfont} def\n")
  75. C
  76. C      Show character string
  77. C
  78.         call plsout ("/S /show load def\n")
  79. C
  80. C      Start and end rotated text
  81. C
  82.         call plsout ("/RS {currentpoint gsave translate rotate} def\n")
  83.         call plsout ("/RE /grestore load def\n")
  84.  
  85.     end if
  86.  
  87. C
  88. C   Initialise common variables
  89. C
  90.     fac  = 1.0
  91.     xold = 0.0
  92.     yold = 0.0
  93.     ires = 300
  94.  
  95.     return
  96.     end
  97.