home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / graphs / progs / pgplot / SYS_ARC_AAReadMe < prev    next >
Encoding:
Text File  |  1994-03-05  |  9.4 KB  |  259 lines

  1.           PGPLOT on an Acorn Archimedes using Fortran release 2.
  2.  
  3.        D.J. & K.M. Crennell ('Fortran Friends')         February 1994
  4.                 P.O. Box 64, Didcot, Oxon OX11 0TH, UK.
  5.  
  6.  --------------------------------------------------------------------------
  7. OBTAINING THE SOURCE
  8.  
  9.   If you already have the source code of PGPLOT, skip this section which
  10. explains how to obtain it using anonymous ftp. If you do not have access to
  11. a relevant network, the !Squashed source of version 4.9H, the TeX of the
  12. manual from 1989, and the distributed applications, may be obtained by
  13. sending £2.00 to cover costs (£3.00 from outside the UK) to K.M. Crennell at
  14. the above address.
  15.  
  16. PGPLOT is available by anonymous ftp as either a compressed tar file (for
  17. UNIX systems) or a compressed backup save-set (for VMS systems). Both
  18. versions contain the same code, which must be compiled for your target
  19. machine.
  20.  
  21. 1. UNIX (tar)
  22.  
  23. Use anonymous ftp (user: anonymous, password: your id [username@machine]) to
  24. node deimos.caltech.edu (131.215.139.14).
  25.  
  26. Issue the following ftp commands to retrieve the compressed PGPLOT  tar
  27. file:
  28.  
  29.         cd pgplot
  30.         binary
  31.         get pgplot49h.tarz pgplot49h.tar.Z
  32.  
  33. Decompress the file to produce file pgplot49h.tar:
  34.  
  35.         uncompress pgplot49h.tar.Z
  36.  
  37. Extract the source code from the tar file
  38.  
  39.         tar xvf pgplot49h.tar
  40.  
  41. This will create directory pgplot (and subdirectories) in the current
  42. directory.
  43.  
  44.  
  45. 2. VMS (backup)
  46.  
  47. Use anonymous ftp (user: anonymous, password: your id [username@machine]) to
  48. node deimos.caltech.edu (131.215.139.14).
  49.  
  50. Issue the following ftp commands to retrieve the compressed PGPLOT backup
  51. saveset and the decompression program (VMS):
  52.  
  53.         cd pgplot
  54.         binary
  55.         get pgplot49h.backup_cmp
  56.         get lzdcm.exe
  57.  
  58. Define a "foreign command" to run the LZDCM program, and then run it
  59. [NB: you cannot use a RUN command]:
  60.  
  61.         $ dcm == "$disk:[dir]LZDCM"
  62.         $ dcm pgplot49h.backup_cmp pgplot49h.backup
  63.  
  64. The programs LZDCM.EXE and LZCMP.EXE are OpenVMS-VAX implementations of the
  65. UNIX compress algorithm. The source code is in directory [.pgplot.lz]. You
  66. may need to recompile LZDCM for OpenVMS-AXP.
  67.  
  68. Extract the source code from from the backup saveset:
  69.  
  70.  $ BACKUP/LOG/VER PGPLOT49H.BACKUP/SAVE/SELECT=[PGPLOT...] -
  71.               disk:[dir.PGPLOT...]
  72.  
  73. This will create directory PGPLOT and subdirectories.
  74.  
  75. It is also possible to copy the source code from a Unix machine; e.g., if
  76. you have Multinet rcp on the VMS machine, use a command like the following
  77. to copy the entire PGPLOT directory tree ("phobos" is the name of the Unix
  78. machine):
  79.  
  80.  $ RCP/LOG/RECURS "phobos::/usr/local/pgplot" [...]
  81.  
  82.  --------------------------------------------------------------------------
  83. TESTED DRIVERS
  84.  
  85. Currently only the following drivers have been tested under RISC-OS3:
  86.  
  87. /NULL to plot onto the null device.
  88.  
  89. /ARC  to use the Fortran Friends graphics library routines to plot to the
  90.       screen. The driver uses the screen mode in use at the time the program
  91.       is invoked; this must be either a 16 or a 256 colour mode.
  92.       The first 16 colours are set to the defaults described in the PGPlot
  93.       manual, the rest are pre-set to black.
  94.  
  95. /PS   to produce a file that can be printed on a Postscript printer.
  96.  
  97. /VPS  to produce a 'vertical' or portrait mode Postscript file.
  98.  
  99. /CPS  to produce a colour Postscript file.
  100.  
  101. /VCPS to produce a 'vertical' or portrait mode colour Postscript file.
  102.  
  103. Please feel free to adapt drivers for other plotting devices and make them
  104. available to other users. A desktop compliant driver would be very welcome.
  105.  
  106.  --------------------------------------------------------------------------
  107. INSTALLING PGPLOT
  108.  
  109. It is assumed that you have transferred the following directories from
  110. California:
  111.  
  112. 0) PGPLOT with text files AAAREADME, COPYRIGHT and PGPLOT/HLP and the
  113.    associated subdirectories:
  114.  
  115. 1) SRC with the portable PGPlot source. This directory contains ~200 files,
  116.    so concatenate the Fortran into 1 file, keeping the two include files
  117.    separate.
  118.  
  119. 2) SYS_ARC which contains all the Archimedes specific code, HicBoot and
  120.    HicRun and the source of the device drivers
  121.  
  122. 3) FONTS
  123.  
  124. 4) EXAMPLES 
  125.  
  126. It is also assumed that you have the PD Fortran libraries 'Graphics' and
  127. 'Utils' which are obtainable on the Shareware 44 Disk for £2 from:
  128.    Norwich Computer Services, 96a Vauxhall Street, Norwich NR2 2SD, UK.
  129.  
  130. These libraries are also supplied with the !Fortran77 utility at £25 from
  131.    Intelligent Interfaces Ltd, P.O.Box 80, Eastleigh, Hants SO5 5YX, UK.
  132.  
  133. Installation  procedure
  134.  
  135. Set up this directory structure on the Archimedes:
  136.  
  137.   !PGPlot -
  138.           Examples -
  139.                      f77 (for the demo source code)
  140.           f77 (for the PGPlot system code)
  141.           SYS_ARC -
  142.                      f77 (for the Archimedes specific code)
  143.  
  144. Copy:
  145. 1) the Examples ReadMe and Fortran source into the Examples and Examples.f77
  146.    directories. 
  147. 2) the portable source file (call it PGPlot) and 2 include files (PGPLOT/IN
  148.    and GRPCKG1/IN) from SRC into the f77 directory.
  149. 3) the contents of the SYS_ARC with its Fortran files into SYS_ARC
  150.    and SYS_ARC.f77
  151. 4) the files GRFONT/TXT, RGB/TXT and PGPLOT/HLP into !PGPlot
  152.    rename the file RGB/TXT as RGBTxt.
  153.  
  154. Then:
  155. 1) Edit the Fortran file in the !PGPlot.f77:
  156.    a) change the all instances of the INCLUDE file names 'pgplot.inc' to
  157.       'f77.PGPLOT/IN' and 'grpckg1.inc' to 'f77.GRPCKG1/IN'
  158.    b) Find the subroutine GRSYXD in the Fortran source, it has an INTEGER*2
  159.       declaration which is not supported by Archimedes Fortran. There is a
  160.       non-standard version in your SYS_ARC.f77 which simulates the INTEGER*2
  161.       code. It was derived from the standard version dated:
  162.       "15-Dec-1988 - standardize". Provided this is the version you have
  163.       just imported then it is OK to remove it from the big source, part c)
  164.       below will insert the new code. Otherwise you will have to improvise
  165.       changes to the GRSYXD in SYS_ARC.f77 to reflect those in the newer
  166.       version.
  167.    c) add a card:
  168.              INCLUDE 'SYS_ARC.f77.ArcInclude'
  169.       at the end to include the Archimedes specific code.
  170. 2) Ensure that the two 'include' files are called PGPLOT/IN and GRPCKG1/IN.
  171. 3) make the Current Selected Directory your !PGPlot (*DIR ...!PGPlot). This
  172.    is not necessary if you are using the !Fortran77 front-end from
  173.    Intelligent Interfaces, or the one from Shareware 44 because they do this
  174.    for you.
  175. 4) compile the code, creating the object file which can then be used as the
  176.    PGPlot library. For convenience, move it into your Fortran libraries
  177.    directory.
  178.  
  179. Now make !PGPlot into an application:
  180.  
  181. 1) copy to it the HicBoot as !Boot and HicRun as !Run from SYS_ARC and
  182.    delete the originals.
  183. 2) make them into 'Obey' files (e.g. *SETTYPE !Boot FEB)
  184. 3) you will also need a !Sprites, so copy one from another application and
  185.    correct it using the !Paint utility. The sprites should be renamed
  186.    '!pgplot' and 'sm!pgplot' so that they will be displayed correctly in the
  187.    filer window.
  188. 4) look at the !Run. It contains several statements setting up the PGPLOT_
  189.    variables required by PGPlot. You may want to alter these or set up some
  190.    of your own.
  191.  
  192. Click on the !PGPlot icon to initialise the global variables and sprites.
  193.  
  194.  --------------------------------------------------------------------------
  195. SET UP THE FONTS
  196.  
  197. 1) Compile, link and run the program SYS_ARC.f77.PGPack; this will create an 
  198.    UNFORMATTED file 'GRFont' in your !PGPlot application.
  199. 2) You may now delete the GRFONT/TXT.
  200.  
  201.  --------------------------------------------------------------------------
  202. TRY THE EXAMPLES
  203.  
  204. Look into !PGPlot.Examples.f77 and edit the source of PGDemo1 and PGDemo3.
  205. These both have statements at the beginning like:
  206.       PI = ACOS(-1.)
  207. This hits one of the few known bugs in the compiler (it actually gives you
  208. ACOS(+1.) which is not useful!), so change these to:
  209.       PI = 3.1415927
  210. or maybe better: 
  211.       PARAMETER(PI = 3.1415927)
  212.  
  213. Now compile a demo, and link it with a command like:
  214.  
  215. *Link -o demo1 aof.PGDemo1 lib.PGPlot lib.Utils lib.Graphics lib.f77
  216.  
  217. then:
  218.  
  219. *Run demo1
  220.  
  221. This will first ask you for the device and should say that the default is
  222. /ARC. Just press return to see the demo on the screen.
  223.  
  224.  --------------------------------------------------------------------------
  225. SETTING UP THE HELP FILE
  226.  
  227. 1) Compile, link (including the Utils library) and run the file:
  228.          SYS_ARC.f77.ConvertHlp
  229.    This will translate the PGPLOT/HLP to a new file HelpPGPlot within your
  230.    !PGPlot application.
  231.  
  232. 2) If you have !SrcEdit and want to use the on-line help, 
  233.    append the lines:
  234.  
  235.         PGplot
  236.         none
  237.         <PGPLOT_DIR>.HelpPGPlot
  238.  
  239.    to the file 'choices.languages' within the !SrcEdit application.
  240.  
  241. 3) if you have !DeskEdit you will have to replace one of the 3 help files in
  242.    !DeskEdit.data (say Help_T) with the HelpPGPlot file you have just made.
  243.  
  244. 4) Delete the PGPLOT/HLP file.
  245.  
  246.  --------------------------------------------------------------------------
  247. OTHER USEFUL PGPLOT ROUTINES
  248.  
  249. Other directories you may find useful on the distribution from California
  250. are the APPLICATIONS, which contains some auxiliary programs but not all in
  251. portable code, and DRIVERS which has all the known device drivers. These are
  252. not usually portable, but you may find some of them a good start if you
  253. want to write a new driver of your own.
  254.  
  255. We welcome any generally useful new utilities and device drivers for PGPlot.
  256. Please send them to 'Fortran Friends' at the above address so that we may
  257. include them in future issues.
  258.  
  259.