home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / crc_plot / part04 < prev    next >
Encoding:
Internet Message Format  |  1987-07-07  |  49.1 KB

  1. Path: uunet!rs
  2. From: rs@uunet.UU.NET (Rich Salz)
  3. Newsgroups: comp.sources.unix
  4. Subject: v10i048:  CRC Plotting Package, Part04/06
  5. Message-ID: <607@uunet.UU.NET>
  6. Date: 9 Jul 87 01:14:34 GMT
  7. Organization: UUNET Communications Services, Arlington, VA
  8. Lines: 2117
  9. Approved: rs@uunet.UU.NET
  10.  
  11. Submitted-by: "Wombat" <rsk@j.cc.purdue.edu>
  12. Posting-Number: Volume 10, Issue 48
  13. Archive-name: crc_plot/Part04
  14.  
  15.  
  16.  
  17. #    This is a shell archive.
  18. #    Remove everything above and including the cut line.
  19. #    Then run the rest of the file through sh.
  20. #----cut here-----cut here-----cut here-----cut here----#
  21. #!/bin/sh
  22. # shar:    Shell Archiver
  23. #    Run the following text with /bin/sh to create:
  24. #    doc [other files... don't panic --r$]
  25. mkdir doc
  26. chdir doc
  27. cat << \SHAR_EOF > HowtoInstall
  28. .NP
  29. .EQ
  30. delim $$
  31. .EN
  32. .ce
  33. Notes on how to install
  34. .br
  35. .sp
  36. .ce
  37. "The CRC Graphics Package"
  38. .br
  39. .sp
  40. .ce 4
  41. Carl Crawford
  42. School of Electrical Engineering
  43. Purdue University
  44. West Lafayette, IN  47901
  45. .sp
  46. .ce
  47. Tel:~~317-494-3456
  48. .sp
  49. .ce 3
  50. UUCP Address:~~VCBVAX!PUR-EE!CRC
  51. ~~~~~~~~~~~~~~~IHNP4!PUR-EE!CRC
  52. ~~~~~~~~~~~~~~~DECVAX!PUR-EE!CRC
  53. .sp 2
  54. .br
  55. .ul
  56. Introduction
  57. .PP
  58. This set of notes is to help new sites install
  59. "the CRC graphics package"
  60. on their systems.
  61. The document first presents descriptions of the sources that are needed
  62. to build the package.
  63. Then how to compile and build the
  64. package.
  65. Finally,
  66. how to configure the defaults to fit the system.
  67. .sp
  68. .ul
  69. .ne 6
  70. Sources
  71. .PP
  72. Create a source directory for the
  73. graphics.
  74. Currently the distribution tape
  75. assumes that
  76. .sp
  77. .ce
  78. /u/crc/graphics
  79. .sp
  80. is the root of the graphics system.
  81. For the purpose of this paper,
  82. .sp
  83. .ce
  84. $"~"~crc$
  85. .sp
  86. will indicate the root of the graphics source.
  87. .PP
  88. Within this directory,
  89. these are the following sub-directories:
  90. .sp
  91. $"~"$crc/lib~~~~~~~~~~library subroutines
  92. .br
  93. $"~"$crc/src~~~~~~~~~~runtime programs
  94. .br
  95. $"~"$crc/charfont~~~~~character' font information
  96. .br
  97. $"~"$crc/doc~~~~~~~~~~nroff sources for documentation
  98. .br
  99. $"~"$crc/tmp~~~~~~~~~~junk directory.  (Ignore if present).
  100. .sp
  101. .PP
  102. The library routines are subroutines
  103. callable from either F77 or C.
  104. Actual device control is done through pipes to programs in 
  105. $"~"$crc/src.
  106. The current drivers are:
  107. .sp
  108. $"~"$crc/src/gp.c~~~~~~Versatec electrostatic printer
  109. .br
  110. $"~"$crc/src/gp/p.c~~~~Printronix lineprinter
  111. .br
  112. $"~"$crc/src/hpd.c~~~~~HP Flatbed plotter
  113. .br
  114. $"~"$crc/src/gd.c~~~~~~Control/Grinnel image displays
  115. .sp
  116. The path names to the respective drivers are within 
  117. the code.
  118. Change them to reflect the configuration of your system.
  119. 'GPLP' pipes its output to 'OPR'.
  120. If you don't have 'OPR',
  121. just write directly to the printronix.
  122. .sp 2
  123. .ul
  124. .ne 8
  125. Installation First Time
  126. .sp
  127. .ul
  128. .ti +5
  129. Library Subroutines
  130. .in +10
  131. CD $"~"$crc/lib
  132. .br
  133. CC -c *.c
  134. .br
  135. AR CA /usr/lib/libG.a 'lorder*.c ltsort' (used to set up proper order
  136. for a one-pass load.)
  137. .sp
  138. .in -10
  139. .ne 8
  140. Runtime
  141. .br
  142. .in +5
  143. .br
  144. CD~~$"~"$crc/src
  145. .br
  146. CC~~gplot.c~-i~-1G~-1m~-0\
  147. .br
  148. .ti +8
  149. /u/bin/gplot
  150. .br
  151. .ti +12
  152. *(note /u is the same as /usr)
  153. .br
  154. CC~~gp.c -0 /u/bin/gp
  155. .br
  156. CC~~gp/p.c -0 /u/bin/gp/p
  157. .br
  158. CC~~strip7.c -0 /u/bin/strip7
  159. .br
  160. mkdir~~/u/lib/graphics
  161. .br
  162. CC~~hpd.c -0 /u/lib/graphics/hpd
  163. .br
  164. CC~~gd.c -0 /u/lib(graphics)gd
  165. .sp
  166. .in -5
  167. .ne 8
  168. Charfont
  169. .in +5
  170. CD~~$"~"$crc/charfont
  171. .br
  172. CC~~genfont.c -0 genfont
  173. .br
  174. genfont /u/lib/graphics/font.5x7 \ < ifont.5x7
  175. .br
  176. (I just noticed that genfont.c is not up to date.
  177. Just copy font.5x7 from the distribution tape).
  178. .in -5
  179. .sp
  180. .PP
  181. I realize that this is all very terse.
  182. But if you look at the distribution tape,
  183. and then at the 'makefiles',
  184. it will be easy to figure out what I mean.
  185. A note on the 'makefiles'.
  186. At Purdue,
  187. we run a network of machines.
  188. The source for the network is on the 'A' machine
  189. and all the other machines are updated from this
  190. particular machine.
  191. .PP
  192. The first couple of lines in each section in each makefile is used
  193. to update the local machine 
  194. (A machine at Purdue).
  195. The rest of each section gets the information
  196. to other machines.
  197. .sp 2
  198. .ul
  199. .ne 8
  200. Documentation
  201. .sp
  202. .in +5
  203. CD~~~~~$"~"$crc/doc
  204. .br
  205. mkdir~~/src/man/graphics/crc
  206. .br
  207. E~=~/src/man/graphics/crc
  208. .br
  209. for i in *.r
  210. .br
  211. DO
  212. .br
  213. ~~~~~~~nroff S|i~>S|E/'basename~S|i'
  214. .br
  215. DONE
  216. .in -5
  217. .sp 2
  218. .ul
  219. .ne 8
  220. Configuration
  221. .PP
  222. In /u/lib/graphics, there should
  223. be four files:
  224. .sp
  225. .nf
  226.                                      FORMAT
  227.                       hpd.site       <machine name>
  228.                       gd.site        <machine name>
  229.                       gp.site        <machine name><size>
  230.                       gplp.site      <-xx>
  231. .fi
  232. .sp
  233. These files tell the respective programs where to send
  234. the graphics output by default.
  235. On the Purdue Network the
  236. <machine name>
  237. is one of the following:
  238. .sp
  239. .nf
  240. .ne 8
  241.                           local      $rarrow$ send output to local device
  242.                           ve         Dual CPU VAX
  243.                           vm         VAX
  244.                           A          11/70
  245.                           B          11/45
  246.                           P          11/70
  247.                           ARPA       11/45
  248. .fi
  249. .sp
  250. If the <machine name> isn't local,
  251. then the program 'ns'
  252. is used to bring up a 'shell' on the
  253. remote machine.
  254. Set the <machine name> to the default machine.
  255. If you do not have a network,
  256. they should all be set to 'local'.
  257. .PP
  258. For gp/p.site the '-xx' specifies the default
  259. network lineprinter.
  260. .PP
  261. For gp.site the <size> field is either 100 or 132.
  262. This number is the size in 'words'
  263. or 'bytes'
  264. (I forget which one)
  265. of the line length.
  266. Most new  Versatecs are 100.
  267. .sp 2
  268. .ul
  269. .ne 8
  270. Update
  271. .PP
  272. All the 'makefiles'
  273. are set up so that all the files are automatically
  274. updated after changes are made.
  275. This is useful on machines where
  276. a network is used.
  277. The program 'cs'
  278. is just another version of the 'ns' routine,
  279. but brings up a long shell.
  280. .sp 2
  281. .ul
  282. .ne 8
  283. Addition of New Network
  284. .PP
  285. This section is useful if you have
  286. a set of machines that use the graphics package and a new one is added.
  287. .PP
  288. Get the following files from an existing machine.
  289. .sp
  290. .nf
  291. .ne 6
  292.                       /u/bin/gplot           
  293.                             /gp              executable
  294.                             /gplp
  295.                             /strip7
  296. .fi
  297. .sp
  298. .nf
  299. .ne 6
  300.            /u/lib/libG.a
  301.                  /graphics/font.5x7
  302.                           /gd
  303.                           /hpd       executable
  304.                           /gplp.site
  305.                           /gp.site
  306.                           /hpd.site
  307.                           /gd.site
  308. .fi
  309. .sp
  310. Then edit the *.site files to reflect the new machine.
  311. .sp 2
  312. .ul
  313. Closing Remarks
  314. .PP
  315. If all the documentation/sources look confusing,
  316. then I apologize.
  317. The graphics package was originally written for my own use and
  318. then released for general use.
  319. I never expected the wide acceptance of the package.
  320. Only in the past few months,
  321. have changes been made to make it easy to 
  322. use at other institutions.
  323. This explains this handwritten document.
  324. .PP
  325. Please do not hesitate to call if you have problems.
  326. .sp 4
  327. .in +35
  328. Carl Crawford
  329. 1 Oct.,  1981
  330. .in -35
  331. .sp 2
  332. P.S.  Good luck and enjoy it once you get it working!
  333. .bp
  334. .BK 12
  335. .ls 2
  336. .nf
  337. Computer File Information:
  338. .in +10
  339. Name of Paper:             "The CRC Graphics Package"
  340. Author(s):                 Carl Crawford
  341. Computer File Name:        CRCgraphic
  342. Account Number:
  343. Charges for this version:  2.0 hours
  344. Done by:                   Jenny Owen
  345. Date:                      Oct. 13, 1981
  346. .in -10
  347. .fi
  348.  
  349. SHAR_EOF
  350. cat << \SHAR_EOF > introduction.0g
  351. .TH INTRODUCTION 0g "CRC Graphics Package"
  352. .SH NAME
  353. Introduction to the CRC Graphics Package
  354. .SH DESCRIPTION
  355. The CRC Plotting Package is a device independent graphics
  356. system. 
  357. Subroutines for generating graphics exist for 
  358. programs written in
  359. FORTRAN or C.
  360. A program called Qplot exists to plot binary vectors
  361. generated as the output of any program.
  362. .PP
  363. The following list indicates the devices currently supported
  364. by this package:
  365. .sp 1
  366. .nf
  367. .ta 1.5i 3i 4.5i
  368. DEVICE    MACHINE(S)    RESOLUTION    DISPLAY SIZE
  369.         (bits)    (in plot units)
  370. Plot(5)        32768 x 32768    Device Dependent
  371. Comtal    ARPA    512 x 512    10 x 10
  372. Grinnel    ARPA    512 x 512    10 x 10
  373. Printronix    P, EC, PP, MA    512 x 512    10 x 10
  374. Retro-Graphic        512 x 256    10 x 10
  375. HP 7221A    EG    10240 x 7800    13.1 x 10
  376. Tektronix 4014    EG    1024 x 780    13.1 x 10
  377. Tektronix 4010    ARPA    1024 x 780    13.1 x 10
  378. .fi
  379. .PP
  380. The MACHINE field indicates which 
  381. network computers currently have
  382. one of the specified devices.
  383. The DISPLAY SIZE is the x by y size of the plotting
  384. area for each device. 
  385. The units are arbitrary and vary from device to
  386. device.
  387. All distances are measured in plot units.
  388. .PP
  389. The CRC Graphics package is currently in a state of transition.
  390. The original package contained all the support for each device and this
  391. accounted for a large number of lines in the package.
  392. With the addition of a number of new graphics devices to
  393. the network this approach has become unworkable so
  394. now the package supports 
  395. .I plot(5)
  396. mode as the preferred output format.
  397. The 
  398. .I plot(1)
  399. program is used to translate plot format into the actual
  400. commands needed to drive each graphics device.
  401. .PP
  402. In addition to the 
  403. .I plot
  404. format, the CRC package supports two types of output formats.
  405. It is anticipated that support for these two formats
  406. will end sometime in the future and users will use the 
  407. .I plot(1g)
  408. program to obtain all output.
  409. The CRC package can talk directly to 
  410. Tektronix 4010 (or 4014) displays
  411. and HP 7221A flat-bed plotters.
  412. The Retro-Graphic works the same way as a Tektronix terminal.
  413. Finally, a number of devices can display graphics on
  414. a 512 by 512 bit plane. 
  415. This bit map can then be copied to one of the
  416. following devices: Comtal graphics overlay, Comtal image display,
  417. Grinnell graphics overlay, Grinnell image display,
  418. or a Printronix line printer. 
  419. .PP
  420. The bit plane can also be written out to a file.
  421. The programs
  422. Gplp (1) can be used to obtain overlayed outputs on
  423. the Printronix.
  424. .sp
  425. The rest of this document is subdivided into four sections. They are:
  426. .sp
  427. .nf
  428. 1) Documentation of Qplot, Strip7, Gplp, Hpd, and Gd.
  429. 2) Documentation of user callable subroutines.
  430. 3) Character font information.
  431. 4) Examples. 
  432. .fi
  433. .PP
  434. Online, all of this information is available with:
  435. .sp
  436. .nf
  437.     $help graphics/crc
  438.  
  439. .fi
  440. SHAR_EOF
  441. cat << \SHAR_EOF > plot3d.1g
  442. .TH PLOT3D 1 "CRC Graphics Package"
  443. .SH NAME
  444. plot3d - Plot 3 dimensional surfaces
  445. .SH SYNOPSIS
  446. plot3d [arguments...]
  447. .SH DESCRIPTION
  448. .B Plot3d 
  449. prints a view of a three dimensional surface.
  450. By using 
  451. .B plot3d
  452. with no arguments, a graph
  453. will be generated on the 
  454. default Printronix line printer as defined 
  455. in 
  456. .B gplp(1).
  457. If ARPA is the host machine, the output will appear
  458. on the Comtal graphics overlay bit-plane zero.
  459. .PP
  460. A matrix of binary floating point numbers will
  461. be read from a file called `z' and used as the z value at each point.
  462. This vector will be displayed against a program generated x-y matrix
  463. containing integers from zero to the number of points in each
  464. direction.
  465. The points in the file are assumed
  466. to be rows of values along lines of constant y.
  467. See the appendix of the 
  468. .I qplot(1g)
  469. manual page for more information about the data formats.
  470. .PP
  471. The input for 
  472. .B plot3d
  473. can be either a binary or an ASCII file.
  474. In a binary file the data is coded in the machine's
  475. internal format.
  476. The file can be generated using the 
  477. .B write
  478. statement
  479. in C or an unformatted write in Fortran or Pascal.
  480. This is the most efficient form since it saves on
  481. both file space and machine time.
  482. .PP
  483. For simple applications it is also possible to give
  484. .B plot3d
  485. an ASCII file with the numbers in a readable format.
  486. The user must be careful to edit out any titles or other 
  487. non-numeric information before 
  488. .B plot3d
  489. is called.
  490. The numbers are read from the file ``free format.''
  491. In other words, spaces, tabs and newlines can all be
  492. used to separate the numbers.
  493. .B Plot3d
  494. will read as many lines as necessary to get enough
  495. data for the plot as specified by the count, skip and
  496. begin parameters.
  497. The numbers that are read from the file must not contain any
  498. spaces.  
  499. .PP
  500. .B Plot3d
  501. supports as many of the 
  502. .B qplot 
  503. options as possible and 
  504. in most cases the variables/flags are known by the same
  505. name.
  506. The most significant difference is that the data file
  507. is indicated by the `z' parameter instead of the `y'
  508. parameter (for obvious reasons).
  509. .PP
  510. The input data for 
  511. .B plot3d
  512. is a matrix of binary numbers.
  513. The type and location of the data is specified
  514. with the 
  515. .I z=
  516. parameter.
  517. The matrix is considered to be size 64 x 64 unless
  518. one of the size parameters is used (
  519. .I size,
  520. .I xsize 
  521. and 
  522. .I ysize
  523. ).
  524. .PP
  525. Data is read from the file along lines of
  526. constant y
  527. (x variable varies fastest).
  528. The first value in the file, file(0),
  529. is z(x=0, y=0), the second is z(x=1, y=0)
  530. and so on.
  531. The second line (y=1) starts at 
  532. number `xsize' in the file
  533. (file(xsize) --> z(x=0, y=1)).
  534. It is very important that the variable 
  535. .I xsize
  536. be
  537. set properly so that 
  538. .B plot3d
  539. can index into the matrix properly.
  540. .PP
  541. With 
  542. the `x' and `y' parameters
  543. an arbitrary mapping can be made between points in 
  544. the matrix (z) and the x and y axis.
  545. Normally each line of the data is assumed
  546. to be equally spaced in x and y.
  547. With the x and y parameters any arbitrary mapping is
  548. possible.
  549. The results are guaranteed to be meaningful 
  550. only for monotonically
  551. increasing mappings.
  552. .PP
  553. With the begin, skip and count parameters
  554. it is possible to specify that part of the
  555. input data be ignored.
  556. If the begin parameters are used,
  557. the first 
  558. .I xbegin
  559. data points
  560. of the z and x files
  561. are ignored.
  562. A similar effect is seen if the 
  563. .I ybegin
  564. parameter is specified.
  565. The default values are 0.
  566. If the skip variables 
  567. .I (skip, xskip 
  568. and
  569. .I yskip)
  570. are set
  571. then lines in the input matrix are skipped between
  572. each point that is plotted.
  573. The count parameter is used to set the number of data 
  574. lines to plot.
  575. Normally the count parameters default to the largest number
  576. possible, given the size, begin and skip variables.
  577. .PP
  578. Superimposing plots is done differently depending on the type of
  579. output format.  
  580. For the HP plotter it is sufficient to use the same piece of
  581. paper for a number of graphs.
  582. For other devices it is necessary to use the
  583. .I -b
  584. option to turn off blanking.
  585. If the output is going to be sent to a bit mapped device (the 
  586. Printtronix printers, image processing devices or the Versatec on ARPA) 
  587. then it is
  588. necessary to use several 
  589. .I plot3d 
  590. commands and to put the output in a file with the
  591. .I g=graph
  592. option.
  593. The resulting bit plane will be a logical-or of each picture and
  594. can be sent to the output device using either the
  595. .I gplp(1g), gd(1g)
  596. or 
  597. .I gp(1g)
  598. commands.
  599. When using 
  600. .I plot(5)
  601. output format it is necessary to use the 
  602. .I -P
  603. option and then redirect the output of 
  604. .I plot3d 
  605. into a file.
  606. Superimposing several graphs is accomplished with a string of commands
  607. like
  608. .nf
  609.     plot3d z=file1,f -P > graph.output
  610.     plot3d z=file2,f -b -P >> graph.output
  611.     plot -Tver graph.output
  612. .fi
  613. .PP
  614. The following options are available to modify the graph:
  615. .sp 
  616. .ne 8
  617. **** FILE SPECIFICATION OPTIONS ****
  618. .TP 14
  619. z=file,?
  620. The z matrix will be read from 'file' instead of 'z'. 
  621. The letter ? is the data type declaration field and
  622. can be one of the following:
  623. .sp
  624. .RS 14
  625. .TP 5
  626. c
  627. Single bytes, unsigned, fixed precision data.
  628. .TP
  629. cs
  630. Single bytes, signed, fixed precision data.
  631. .TP
  632. s
  633. Two bytes, signed, fixed precision data.
  634. .TP
  635. i
  636. Two bytes (PDP 11's), signed, fixed precision data.
  637. .TP
  638. i
  639. Four bytes (Vax's), signed, fixed precision data.
  640. .TP
  641. l
  642. Four bytes, signed, fixed precision data.
  643. .TP
  644. f
  645. Four bytes, floating point data.
  646. .TP
  647. d
  648. Eight bytes, floating point data.
  649. .TP
  650. a
  651. ASCII data, free format numbers, data is readable,
  652. spaces, tabs and newlines are used to seperate input points.
  653. .sp
  654. .RE
  655. .RS 14
  656. If n isn't specified, a comma is not needed after the file name.
  657. The default for n is `f'.
  658. .RE
  659. .TP 14
  660. z=,n
  661. The z vector is read from the default file `z' but the 
  662. byte declaration field is set to n.
  663. .TP 14
  664. -x
  665. Read the x vector from the file `x'.
  666. The data in the file is assumed to be binary integer quantities.
  667. .TP 14
  668. x=file,?
  669. The x vector will be read from the file `file' instead of `x'.
  670. The data in the file is assumed to be binary integer quantities
  671. unless a `,?' is added.  
  672. The `?' can be any of the suffixes shown above with the `z=' option.
  673. If the file is binary integer data then it is not necessary to 
  674. use the `,i' option.
  675. .TP 14
  676. -y
  677. Read the y vector from the file `y'.
  678. The data in the file is assumed to be binary integer quantities.
  679. .TP 14
  680. y=file,?
  681. The y vector will be read from the file `file' instead of `y'.
  682. The data in the file is assumed to be binary integer quantities
  683. unless a `,?' is added.  
  684. The `?' can be any of the suffixes shown above with the `z=' option.
  685. If the file is binary integer data then it is not necessary to 
  686. use the `,i' option.
  687. .TP 14
  688. xsize=n
  689. The matrix has `n' elements in the x-direction.  
  690. The default value is 64.
  691. It is necessary to specify this variable if the
  692. array is not 64 x 64.
  693. .B Plot3d
  694. interprets the `z' file as an xsize x ysize matrix of values.
  695. .TP 14
  696. ysize=n
  697. The matrix has `n' elements in the y-direction.  
  698. The default value is 64.
  699. .B Plot3d
  700. interprets the `z' file as an xsize x ysize matrix of values.
  701. .TP 14
  702. size=n
  703. Set both `xsize' and `ysize' equal to `n'.
  704. .TP 14
  705. n=n
  706. This sets xsize, and ysize variables
  707. equal to n.
  708. This is equivalent to using the 
  709. .I size=
  710. parameter.
  711. .HP 0
  712. .sp
  713. .ne 8
  714. **** DATA SELECTION OPTIONS ****
  715. .TP 14
  716. xbegin=n
  717. The first `n' lines of the input in the `z' file
  718. and `n' values in the `x' file are skipped.
  719. This is used to place the origin of the plot
  720. at an arbitrary position in the matrix.
  721. The default value is 0.
  722. .TP 14
  723. ybegin=n
  724. The first `n' lines of the input in the `z' file
  725. and `n' values in the `y' file are skipped.
  726. This is used to place the origin of the plot
  727. at an arbitrary position in the matrix.
  728. The default value is 0.
  729. .TP 14
  730. begin=n
  731. Set the parameters `xbegin' and `ybegin' equal to n.
  732. .TP 14
  733. xskip=n
  734. Skip `n' lines in the `z' file and `n' values in the `x'
  735. file between plotted data points.
  736. The default value is 0.
  737. .TP 14
  738. yskip=n
  739. Skip `n' lines in the `z' file and `n' values in the `y'
  740. file between plotted data points.
  741. The default value is 0.
  742. .TP 14
  743. skip=n
  744. Set the parameters `xskip' and `yskip' equal to n.
  745. .TP 14
  746. xcount=n
  747. Only plot `n' of the lines in the matrix.
  748. Show n values in the matrix for each line 
  749. of constant y.
  750. The default value is the largest number of points
  751. that can be plotted for the given 
  752. .I xsize, xbegin
  753. and 
  754. .I xskip.
  755. .TP 14
  756. ycount=n
  757. Only plot `n' of the lines in the matrix.
  758. Show n values in the matrix for each line 
  759. of constant x.
  760. The default value is the largest number of points
  761. that can be plotted for the given 
  762. .I ysize, ybegin
  763. and 
  764. .I yskip.
  765. .TP 14
  766. count=n
  767. Set the parameters `xcount' and `ycount' equal to n.
  768. .TP 14
  769. zmin=r
  770. All points in the matrix below the level `r'
  771. are set to `r'.
  772. This is useful for seeing details in the
  773. surface.
  774. See also the 
  775. .I zmax 
  776. parameter.
  777. The default value is negative infinity.
  778. .TP 14
  779. zmax=r
  780. All points in the matrix above the level `r'
  781. are set to `r'.
  782. This is useful for seeing details in the
  783. surface.
  784. See also the 
  785. .I zmin 
  786. parameter.
  787. The default value is positive infinity.
  788. .HP 0
  789. .sp
  790. .ne 8
  791. **** PLOT POSITIONING AND REDUCING OPTIONS ****
  792. .sp
  793. .TP 14
  794. xp=r
  795. The x starting coordinate of the axes is moved to
  796. position r on the plot plane.
  797. The default value of r is 0.
  798. The plot is 10 units wide.
  799. .TP 14
  800. yp=r
  801. Same as the `xp=r' flag but the y origin is moved to r on the plot plane.
  802. The plot is 10 units high.
  803. .TP 14
  804. scfac=r
  805. The graph is expanded or reduced in size by r.
  806. The default value is 1.0.
  807. .TP 14
  808. phi1=theta
  809. The surface is rotated around the z-axis by an angle
  810. of theta before plotting.
  811. The zero angle corresponds to looking down
  812. the y axis.
  813. The default value
  814. is 40 degrees.
  815. .TP 14
  816. phi2=theta
  817. The observation plane is tilted by theta degrees
  818. from the horizontal.
  819. Zero degrees corresponds to looking at the surface
  820. from the x-y plane; 
  821. 90 degrees is looking at the object from directly
  822. above.
  823. Neither of the two views at the extremes
  824. provide much information.
  825. The default value is 30 degrees.
  826. .TP 14
  827. -r
  828. Reverse the direction of the `z' axis.
  829. This effectively multiplies each data point by -1.
  830. The default is for this option to be off.
  831. .TP 14
  832. -R
  833. Do not reverse the direction of the `z' axis.
  834. This flag turns off the `-r' flag above.
  835. .sp
  836. .HP 0
  837. .ne 8
  838. **** DEVICE SELECTION OPTIONS ****
  839. .TP 14
  840. -P
  841. Output the graph to standard output in 
  842. .I plot (5)
  843. format.
  844. This is a device independent format that can be piped through
  845. the 
  846. .I plot(1) 
  847. program.
  848. .TP 14
  849. plot=xx
  850. Output the graph in plot format (See section 5 of the UNIX manual)
  851. piping all plotting commands to the plot program.
  852. The 
  853. .I xx 
  854. argument is used as a type argument to the plot command.
  855. Thus the use of
  856. .I plot3d plot=4014
  857. is equivalent to the command string
  858. .I plot3d -P | plot -T4014.
  859. For example the following are other valid devices:
  860. adm (to send to a terminal), ver (to send to the versatec), 
  861. 4014 (to send to a Tek 4014 terminal).  
  862. See the
  863. .I plot(1) 
  864. manual for additional devices.
  865. .TP 14
  866. -p
  867. The plot is sent to the Printronix line printer through
  868. .B gplp
  869. (1).
  870. This is the default output option for all
  871. host machines except for ARPA.
  872. See 
  873. .B gplp
  874. (1) to
  875. determine to which network line printer the output
  876. will be sent.
  877. .TP 14
  878. site=XX
  879. The output is sent to the network line printer
  880. specified by XX.
  881. See 
  882. .B opr 
  883. (1) for more information
  884. about the allowable printer names.
  885. This option invokes
  886. the `-p' option.
  887. .TP 14
  888. -t
  889. Display the plot on a Tektronix 4010 or 4014 display.
  890. Standard output must end up on the specified terminal.
  891. .TP 14
  892. -T
  893. Display the plot on a Retro-Graphics RG-512  in
  894. conjunction with an ADM-3A terminal.
  895. .TP 14
  896. -h
  897. Display the plot on an HP plotter.
  898. .TP 14
  899. pen=n
  900. When using the HP plotter, the pen in bin 
  901. .I n
  902. is used to
  903. plot the graph.
  904. The default bin is 1.
  905. This invokes the 
  906. .I -h
  907. flag.
  908. .TP 14
  909. speed=n
  910. The HP plotter's pen movement velocity will be changed
  911. to `n' cm/sec.
  912. The valid range for n is [1,36].
  913. The
  914. default value is 36.
  915. This option will invoke the `-h'
  916. flag.
  917. .TP 14
  918. -v
  919. The plot is sent to the Versatec printer/plotter through a
  920. pipe to gp (1).
  921. NOTE: This option is obsolete on all machines except for the DIPL machine.
  922. Users should use the 
  923. .I plot=ver
  924. option to obtain versatec output elsewhere on the network.
  925. .TP 14
  926. -o
  927. The graph is written out to standard output.
  928. .TP 14
  929. g=file
  930. The graph is written out to a file named `file'.
  931. This
  932. file can be sent to the ARPA Versatec or Printronix with 
  933. .B gp
  934. (1) and 
  935. .B gplp
  936. (1), respectively.
  937. .TP 14
  938. op=str
  939. The string is an appended to the call to 
  940. .B gplp, gp, hpd, 
  941. and 
  942. .B gd.
  943. This provides a method to change any of
  944. the options to the driver programs.
  945. .TP 14
  946. -b
  947. The display device is not blanked before plotting.
  948. This
  949. option has no effect when used with the `h', `v', `V',
  950. and `p' flags.
  951. If the `g=file' option is used 
  952. and `file' exists in the local directory before plotting
  953. begins, then the new graphics will overlay the graphics
  954. contained in `file'.
  955. .TP 14
  956. -B
  957. Turn off the -b flag.
  958. This option is set by default.
  959. .TP 14
  960. -c
  961. The plot is displayed on the Comtal.
  962. The default action is to display the plot on graphics
  963. overlay 0 unless the -0, -1, -2, -3 or -i flags are used.
  964. The Comtal is the default device if ARPA is the host machine,
  965. or the 
  966. .I -i, -g, -0, -1, -2
  967. and 
  968. .I -3
  969. flags are used.
  970. The Comtal is connected to the ARPA machine.
  971. .TP 14
  972. -G
  973. Display the plot on the Grinnel connected to the ARPA
  974. machine.
  975. The default action is to display the plot on graphics
  976. overlay 0 unless the -0, -1, -2, -3 or -i flags are used.
  977. A Grinnell is connected to the ARPA and the PB machines.
  978. .TP 14
  979. -i
  980. Display the plot on an image plane instead of a graphics overlay.
  981. This flag is the opposite of the 
  982. .I -g
  983. flag.
  984. If this flag is used then the Comtal (
  985. .I -c
  986. ) is the default device.
  987. .TP 14
  988. -g
  989. Display the plot on a graphic overlay instead of an image plane.
  990. This flag
  991. is set by default if ARPA is the host machine.
  992. This flag is the opposite of the 
  993. .I -i
  994. flag.
  995. If this flag is used then the Comtal (
  996. .I -c
  997. ) is the default device.
  998. .TP 14
  999. -n
  1000. The plot is displayed on the graphic overlay 
  1001. or image plane 
  1002. .I n.
  1003. The number 
  1004. .I n 
  1005. can be either 0,1, 2, 3.
  1006. If this flag is used then the Comtal (
  1007. .I -c
  1008. ) is the default device.
  1009.  
  1010. .RS 0
  1011. .ne 8
  1012. **** AXIS OPTIONS ****
  1013. .TP 14
  1014. -a
  1015. No axes will be plotted.
  1016. .TP 14
  1017. axis=[xyz]
  1018. An axis will be plotted only for axis listed after the equals sign.
  1019. The default action is 
  1020. .I axis=xyz
  1021. which labels all three axis of the plot.
  1022. The option
  1023. .I axis=
  1024. is equivalent to the
  1025. .I -a
  1026. option.
  1027. .TP 14
  1028. -f
  1029. A border will be drawn around the plot.
  1030. .TP 14
  1031. -F
  1032. Do not draw a border around the plot.  This is the default.
  1033. .TP 14
  1034. zaxis=r
  1035. The x-y axis of the plot is drawn at 
  1036. .I z=r.
  1037. The default value is -.05.
  1038. .TP 14
  1039. len=r
  1040. Set the length of all axes to 
  1041. .I r.
  1042. The default value is 8.
  1043. .TP 14
  1044. xlen=r
  1045. The length of the x axis is changed from 
  1046. eight plot units to 
  1047. .I r
  1048. units.
  1049. This parameter is relative to the default value of 8. 
  1050. The actual length of the x axis in the 2-d plot coordinate system
  1051. is a function of the angle of view and the 
  1052. .I scfac.
  1053. .TP 14
  1054. ylen=r
  1055. The length of the y axis 
  1056. is changed from eight plot units to 
  1057. .I r
  1058. units.
  1059. This parameter is relative to the default value of 8. 
  1060. The actual length of the y axis in the 2-d plot coordinate system
  1061. is a function of the angle of view and the 
  1062. .I scfac.
  1063. .TP 14
  1064. zlen=r
  1065. The length of the z axis 
  1066. is changed from eight plot units to r units.
  1067. This parameter is relative to the default value of 8. 
  1068. The actual length of the y axis in the 2-d plot coordinate system
  1069. is a function of the angle of view and the 
  1070. .I scfac.
  1071. .TP 14
  1072. raxis=xyz
  1073. Floating point (real) numbers will be used to label the axis.
  1074. If just `x' is specified then only the x-axis will be forced to floating
  1075. point notation.
  1076. If just `y' is specified then only the y-axis will be forced to floating
  1077. point notation.
  1078. If just `z' is specified then only the z-axis will be forced to floating
  1079. point notation.
  1080. If `xyz' is used then all axis will be forced to floating
  1081. point notation.
  1082. If none of the axis are listed then all axis will be labelled with
  1083. integers.
  1084. Any combination of `xyz' can be specified.
  1085. The default notation is determined by the type of data used as input
  1086. to the program.
  1087. If integer data is used as input then the axis will be labelled with
  1088. integers.  Otherwise floating point notation is used.
  1089. .TP 14
  1090. dig=n
  1091. The number of significant digits used in the annotation
  1092. of the axes will be set to 'n'.
  1093. The default value is
  1094. six significant digits.
  1095. .TP 14
  1096. xdig=n
  1097. Set the number of significant digits in the x axis to
  1098. n.
  1099. .TP 14
  1100. ydig=n
  1101. Set the number of significant digits in the y axis to
  1102. n.
  1103. .TP 14
  1104. zdig=n
  1105. Set the number of significant digits in the z axis to
  1106. n.
  1107. .TP 14
  1108. tic=r
  1109. The distance between tic marks for both the x, y and z
  1110. axes will be changed to r.
  1111. The default value of r is
  1112. one.
  1113. .TP 14
  1114. xtic=r
  1115. Set only the x tic mark distance.
  1116. .TP 14
  1117. ytic=r
  1118. Set only the y tic mark distance.
  1119. .TP 14
  1120. ztic=r
  1121. Set only the z tic mark distance.
  1122. .HP 0
  1123. .sp
  1124. .ne 8
  1125. **** LABEL OPTIONS ****
  1126. .TP 14
  1127. tl=str
  1128. The string will be used as a label at the top of the graph.
  1129. .TP 14
  1130. bl=str
  1131. The string will be used as a label at the bottom of the graph.
  1132. .TP 14
  1133. xl=str
  1134. The character string is used as a label along the x
  1135. axis.
  1136. .TP 14
  1137. yl=str
  1138. The character string is used as a label along the y
  1139. axis.
  1140. .TP 14
  1141. zl=str
  1142. The character string is used as a label next the z
  1143. axis.
  1144. .TP 14
  1145. -l
  1146. The user will be prompted for labels not entered with
  1147. the `xl', `yl' and `zl' options.
  1148. .TP 14
  1149. -L
  1150. Don't prompt for labels.
  1151. This option is the default.
  1152. .HP 0
  1153. .sp
  1154. .ne 8
  1155. **** GRAPH OPTIONS ****
  1156. .TP 14
  1157. direction=[xy]
  1158. Plot lines along the axis (or axes) specified by this parameter.
  1159. The default is to plot the lines along the y axes 
  1160. only or 
  1161. .I direction=y.
  1162. The options 
  1163. .I direct= 
  1164. and 
  1165. .I dir=
  1166. are synonyms for this parameter.
  1167. Use of the 
  1168. .I direction=x
  1169. or 
  1170. .I direction=y
  1171. parameters is encouraged since half the 
  1172. CPU time is used to produce the plot.
  1173. In addition if a large number of lines are to be drawn,
  1174. the graph will often appear simpler if lines are only drawn
  1175. in one direction.
  1176. .TP 14
  1177. resolution=x
  1178. This parameter controls the resolution of the ``hide'' subroutine.
  1179. The default value is 1.0 and larger values can be used to produce
  1180. a more accurate estimate of the line intersections at the expense
  1181. of more computer time.
  1182. Values larger than one are generally needed only for publication
  1183. quality plots of functions with large number of discontinuities.
  1184. Conversely a value smaller than one will save computer time at
  1185. the expense of small errors in the intersections.
  1186.  
  1187. .HP 0
  1188. .PP
  1189. The parse routines internal to 
  1190. .B plot3d
  1191. allow for
  1192. two default mechanisms
  1193. to specify options.
  1194. The first method is to create a file `.plot3drc'
  1195. in
  1196. your HOME directory (see environ(5)). 
  1197. In it, one can place
  1198. options and flags that 
  1199. .B plot3d
  1200. will use before it parses your
  1201. command line. The syntax is one command or flag string per line.
  1202. .PP
  1203. As an example, consider the case where the user wishes to always
  1204. obtain output on the Versatec and the plot be framed. Also the
  1205. length of the axes are desired to be 6 units.
  1206. The correct format for
  1207. the file `.plot3drc'
  1208. would be:
  1209. .RS 14
  1210. .nf
  1211.  
  1212. -vf
  1213. len=6
  1214. .fi
  1215. .RE
  1216. .PP
  1217. The second method to set default
  1218. options is to set the environment variable `PLOT3DARGS'.
  1219. The format of `PLOT3DARGS'
  1220. is the same as the input command line.
  1221. .PP
  1222. The options set in the previous example can be set using 
  1223. the following
  1224. procedure: 
  1225. .RS 14
  1226. .nf
  1227.  
  1228. For /bin/sh:
  1229.     $ PLOT3DARGS='-vf len=6'
  1230.     $ export PLOT3DARGS
  1231.  
  1232. For /bin/csh
  1233.     $ setenv PLOT3DARGS '-vf len=6'
  1234.  
  1235. .fi
  1236. .RE
  1237. If you need to set up labels with
  1238. the `bl=', or `tl='
  1239. options, surround the respective
  1240. option with double quotes. An example:
  1241. .RS 14
  1242. .nf
  1243.  
  1244. $PLOT3DARGS='-vf "tl=this is the title"'
  1245.  
  1246. .fi
  1247. .RE
  1248. There is no way to get a double quote into the label field.
  1249. .PP
  1250. .B Plot3d
  1251. will parse the file `.plot3drc'
  1252. first if it exists. Then it
  1253. will parse `PLOT3DARGS'
  1254. if it exists. 
  1255. Finally, 
  1256. .B plot3d
  1257. will parse
  1258. the command line.
  1259. .SH FILES
  1260. .TP 14
  1261. /etc/cpu
  1262. Contains name of host
  1263. .SH SEE ALSO
  1264. graphics/crc and 
  1265. .B qplot(1)
  1266. documentation
  1267. .SH AUTHOR
  1268. Mani Azimi assembled the 
  1269. .B plot3d 
  1270. program from software written by a couple of people.
  1271. Carl Crawford did some of the work when he wrote
  1272. .B qplot.
  1273. The Fortran program that actually does the plotting was
  1274. rewritten by Mani Azimi based on code that was available 
  1275. in the EE department for several years.
  1276. .SH DIAGNOSTICS
  1277. Bad command line requests are flagged.
  1278. Occasionally an `out of bounds' warning will result
  1279. from looking at a surface from too high an angle.
  1280. .SH BUGS
  1281. Array size is limited on the PDP 11's, especially when using the 
  1282. bit mapped devices (Grinnel, Comtal, Versatec, Printronix.)
  1283. .PP
  1284. No check is made to insure 
  1285. that the number of points to read
  1286. from the input file for each line (count*(skip+1)+begin)
  1287. is consistent with the `size' parameters.
  1288. .PP
  1289. The resolution parameter really shouldn't be necessary.
  1290. .SH FUTURE
  1291. Eventually all devices except for plot format will be phased out.
  1292. It is not practical for 
  1293. .I plot3d 
  1294. to know about every possible output device.
  1295. Instead it is better that 
  1296. .I plot3d
  1297. output a generic format with infinite resolution and 
  1298. let each device filter produce the best plot possible.
  1299. .SH SUPPORT
  1300. Funding for the development of this software was provided by
  1301. Prof. A.C.Kak of Electrical Engineering.
  1302. Bug fixes and enhancements will be made on a time available
  1303. basis by the author.
  1304. SHAR_EOF
  1305. cat << \SHAR_EOF > qplot.1g
  1306. .TH QPLOT 1 "CRC Graphics"
  1307. .SH NAME
  1308. Qplot - Quick Plot
  1309. .SH SYNOPSIS
  1310. qplot [arguments]
  1311. .SH DESCRIPTION
  1312. .B Qplot
  1313. is used to display one vector versus another on various
  1314. graphic devices.
  1315. By using 
  1316. .B Qplot
  1317. with no arguments, a graph will
  1318. be generated on the default Printronix line printer as defined in
  1319. .B gplp 
  1320. (1).
  1321. If ARPA is the host machine, the output will appear on
  1322. the Comtal graphics overlay bit-plane zero.
  1323. .PP
  1324. A set of 
  1325. numbers will be read from a file called 'y' and used as the
  1326. y vector.
  1327. This vector will be displayed against a program
  1328. generated x vector containing integers from zero to the number of
  1329. points in the y vector minus one.
  1330. .PP
  1331. The input for 
  1332. .B qplot
  1333. can be either a binary or an ASCII file.
  1334. In a binary file the data is coded in the machine's
  1335. internal format.
  1336. The file can be generated using the 
  1337. .B write 
  1338. statement
  1339. in C or an unformatted 
  1340. .B write
  1341. in Fortran or Pascal.
  1342. This is the most efficient form since it saves on
  1343. both file space and machine time.
  1344. .PP
  1345. For simple applications it is also possible to give
  1346. qplot an ASCII file with the numbers in a readable format.
  1347. The user must be careful to edit out any titles or other 
  1348. non-numeric information before 
  1349. .B qplot
  1350. is called.
  1351. The numbers are read from the file ``free format.''
  1352. In other words, spaces, tabs and newlines can all be
  1353. used to separate the numbers.
  1354. .B Qplot
  1355. will read as many lines as necessary to get enough
  1356. data for the plot as specified by the count, skip and
  1357. begin parameters.
  1358. The numbers that are read from the file must not contain any
  1359. spaces.  
  1360. .PP
  1361. Superimposing plots is done differently depending on the type of
  1362. output format.  
  1363. For the HP plotter it is sufficient to use the same piece of
  1364. paper for a number of graphs.
  1365. For other devices it is necessary to use the
  1366. .I -b
  1367. option to turn off blanking.
  1368. If the output is going to be sent to a bit mapped device (the 
  1369. Printronix printers, image processing devices or the Versatec on ARPA) 
  1370. then it is
  1371. necessary to use several 
  1372. .I plot3d 
  1373. commands and to put the output in a file with the
  1374. .I g=graph
  1375. option.
  1376. The resulting bit plane will be a logical-or of each picture and
  1377. can be sent to the output device using either the
  1378. .I gplp(1g), gd(1g)
  1379. or 
  1380. .I gp(1g)
  1381. commands.
  1382. When using 
  1383. .I plot(5)
  1384. output format it is necessary to use the 
  1385. .I -P
  1386. option and then redirect the output of 
  1387. .I plot3d 
  1388. into a file.
  1389. Superimposing several graphs is accomplished with a string of commands
  1390. like
  1391. .nf
  1392.     qplot y=file1,f -P > graph.output
  1393.     qplot y=file2,f -b -P >> graph.output
  1394.     plot -Tver graph.output
  1395. .fi
  1396. .PP
  1397. The following options are
  1398. available to modify the graph:
  1399.  
  1400. .RS 0
  1401. **** FILE SPECIFICATION OPTIONS ****
  1402. .TP 14
  1403. y=file,n 
  1404. The y vector will be read from 'file' instead of 'y'.
  1405. The number n is the byte declaration field and can be
  1406. one of the following:
  1407. .RS 10
  1408. .TP 4
  1409. c
  1410. Single byte, unsigned, fixed precision data.
  1411. .TP 4
  1412. cs
  1413. Single byte, signed, fixed precision data.
  1414. .TP 4
  1415. s
  1416. Two bytes, signed, fixed precision data.
  1417. .TP 4
  1418. i
  1419. Two bytes (PDP 11's), signed, fixed precision data.
  1420. .TP 4
  1421. i
  1422. Four bytes (Vax's), signed, fixed precision data.
  1423. .TP 4
  1424. l
  1425. Four bytes, signed, fixed precision data.
  1426. .TP 4
  1427. f
  1428. Four bytes, floating point data.
  1429. .TP 4
  1430. d
  1431. Eight bytes, floating point data.
  1432. .TP 4
  1433. a
  1434. ASCII numbers, free format data, file is readable, 
  1435. spaces, tabs and newlines are used
  1436. to separate input points.
  1437. .RE
  1438. .RS 10
  1439. If 
  1440. .I n
  1441. isn't specified, a comma is not needed after the
  1442. file name.
  1443. The default for n is `f'.
  1444. .RE
  1445. .TP 14
  1446. y=,n
  1447. The y vector is read from the default file `y' but the
  1448. byte declaration field is set to 
  1449. .I n.
  1450. .TP 14
  1451. -x
  1452. The x vector will be read from a file called `x'
  1453. instead of having 
  1454. .B qplot
  1455. generating it for you.
  1456. The
  1457. default file type is `i'.
  1458. .TP 14
  1459. -X
  1460. Turn off the -x flag.
  1461. This option is set by default.
  1462. .TP 14
  1463. x=file,n
  1464. The x vector is read from `file' instead of `x'.
  1465. The
  1466. byte declaration for this vector is set to n.
  1467. The
  1468. default type is `i'.
  1469. This option invokes the -x flag.
  1470. .TP 14
  1471. x=,n
  1472. The x vector is read from the default input file `x'
  1473. but the byte declaration is set to n.
  1474. .TP 14
  1475. count=n
  1476. Up to n points will be read from the input file.
  1477. N can
  1478. have a maximum value of 512.
  1479. The default value of n is
  1480. 512.
  1481. .TP 14
  1482. begin=n
  1483. The first n points in the x and y files will be
  1484. ignored.
  1485. If `begin' is negative, then the value
  1486. actually used will be given by the product of `count'
  1487. and the absolute value of `begin'.
  1488. The starting point
  1489. on the program generated x vector will be 
  1490. set to `begin'.
  1491. The default value of n is zero.
  1492. .TP 14
  1493. skip=n
  1494. Only every (n+1)'th point will be read from the
  1495. input file.
  1496. The program generated x vector incremental
  1497. value is set to `n' + 1.
  1498. The default value of n is
  1499. zero.
  1500.  
  1501. .RS 0
  1502. **** SCALING OPTIONS ****
  1503. .TP 14
  1504. s=file
  1505. .B Qplot
  1506. generates the scale values for the x and y
  1507. vectors by finding the minimum and maximum values of
  1508. each vector.
  1509. If `file' exists  in  the  current
  1510. directory, the minimum and maximum values used by the
  1511. scaling routines will be read from it.
  1512. The format of
  1513. the file is four numbers on a single line in the
  1514. following format: `xmin xmax ymin ymax'.
  1515. The default
  1516. name for `file' is `xybnd'.
  1517. .TP 14
  1518. ymin=r
  1519. The ymin value read from the scale file or obtained
  1520. from the y vector is replaced by r.
  1521. .TP 14
  1522. ymax=r
  1523. The ymax value read from the scale file or obtained
  1524. from the y vector is replaced by r.
  1525. .TP 14
  1526. xmin=r
  1527. Works the same as the `ymin=' option when the 
  1528. .I -x
  1529. flag
  1530. is used.
  1531. Otherwise the program will create the x
  1532. vector with a starting value of 
  1533. .I r.
  1534. .TP 14
  1535. xmax=r
  1536. Works the same as the `ymax=' option when the -x flag
  1537. is used.
  1538. If the program generates the x vector 
  1539. and the `xmin=r1' 
  1540. and `xmax=r2' options are
  1541. also used, then the x vector will
  1542. be a set of equally spaced point integers
  1543. between r1 and r2.
  1544. .TP 14
  1545. -s
  1546. The xmin, xmax, ymin, ymax values used to make the
  1547. graph  are written out to the 
  1548. file specified by `s=file'.
  1549. This is useful in plotting multiple graphs
  1550. with the same scale.
  1551. The file has the same format as
  1552. the input scale file.
  1553. .TP 14
  1554. -S
  1555. Turn off the -s flag.
  1556. This option is set by default.
  1557.  
  1558. .ne 8
  1559. .RS 0
  1560. **** POSITIONING AND REDUCING OPTIONS ****
  1561. .TP 14
  1562. xp=r
  1563. The x starting coordinate of the graph is moved to
  1564. position `r'.
  1565. The default value of r is zero.
  1566. .TP 14
  1567. yp=r
  1568. Same as the `xp=r' flag but the y origin is moved to `r'.
  1569. .TP 14
  1570. scfac=r
  1571. The graph is expanded or reduced in size by `r'.
  1572. The
  1573. default value is 1.0.
  1574.  
  1575. .RS 0
  1576. **** DEVICE SELECTION OPTIONS ****
  1577. .TP 14
  1578. -P
  1579. Output the graph to standard output in 
  1580. .I plot (5)
  1581. format.
  1582. This is a device independent format that can be piped through
  1583. the 
  1584. .I plot(1) 
  1585. program.
  1586. .TP 14
  1587. plot=xx
  1588. Output the graph in plot format (See section 5 of the UNIX manual)
  1589. piping all plotting commands to the plot program.
  1590. The 
  1591. .I xx 
  1592. argument is used as a type argument to the plot command.
  1593. Thus the use of
  1594. .I qplot plot=4014
  1595. is equivalent to the command string
  1596. .I qplot -P | plot -T4014.
  1597. For example the following are other valid devices:
  1598. adm (to send to a terminal), ver (to send to the versatec), 
  1599. 4014 (to send to a Tek 4014 terminal).  
  1600. See the
  1601. .I plot(1) 
  1602. manual for additional devices.
  1603. .TP 14
  1604. -p
  1605. The plot is sent to the Printronix line printer through
  1606. .B gplp
  1607. (1).
  1608. This is the default output option for all
  1609. host machines except for ARPA.
  1610. See 
  1611. .B gplp
  1612. (1) to
  1613. determine to which network line printer the output
  1614. will be sent.
  1615. .TP 14
  1616. site=XX
  1617. The output is sent to the network line printer
  1618. specified by XX.
  1619. See 
  1620. .B opr 
  1621. (1) for more information
  1622. about the allowable printer names.
  1623. This option invokes
  1624. the `-p' 
  1625. .TP 14
  1626. -t
  1627. Display the plot on a Tektronix 4010 or 4014 display.
  1628. Standard output must end up on the specified terminal.
  1629. .TP 14
  1630. -T
  1631. Display the plot on a Retro-Graphics RG-512  in
  1632. conjunction with an ADM-3A terminal.
  1633. .TP 14
  1634. -h
  1635. Display the plot on an HP plotter.
  1636. .TP 14
  1637. pen=n
  1638. When using the HP plotter, the pen in bin n is used to
  1639. plot the graph.
  1640. The default bin is 1.
  1641. This invokes the `-h' flag.
  1642. .TP 14
  1643. speed=n
  1644. The HP plotter's pen movement velocity will be changed
  1645. to `n' cm/sec.
  1646. The valid range for n is [1,36].
  1647. The
  1648. default value is 36.
  1649. This option will invoke the `-h'
  1650. flag.
  1651. flag.
  1652. .TP 14
  1653. -v
  1654. The plot is sent to the Versatec printer/plotter through a
  1655. pipe to gp (1).
  1656. NOTE: This option is obsolete on all machines except for the DIPL machine.
  1657. Users should use the 
  1658. .I plot=ver
  1659. option to obtain versatec output elsewhere on the network.
  1660. .TP 14
  1661. -o
  1662. The graph is written out to standard output.
  1663. .TP 14
  1664. g=file
  1665. The graph is written out to a file named `file'.
  1666. This
  1667. file can be sent to the Versatec or Printronix with 
  1668. .B gp
  1669. (1) and 
  1670. .B gplp
  1671. (1), respectively.
  1672. .TP 14
  1673. op=str
  1674. The string is appended to the call to 
  1675. .B gplp, gp, hpd, 
  1676. and 
  1677. .B gd.
  1678. This provides a method to change any of
  1679. the options to the driver programs.
  1680. .TP 14
  1681. -b
  1682. The display device is not blanked before plotting.
  1683. This
  1684. option has no effect when used with the `h', `v', `V',
  1685. and `p' flags.
  1686. If the `g=file' option is used 
  1687. and `file' exists in the local directory before plotting
  1688. begins, then the new graphics will overlay the graphics
  1689. contained in `file'.
  1690. .TP 14
  1691. -B
  1692. Turn off the -b flag.
  1693. This option is set by default.
  1694. .TP 14
  1695. -c
  1696. The plot is displayed on the Comtal.
  1697. The default action is to display the plot on graphics
  1698. overlay 0 unless the -0, -1, -2, -3 or -i flags are used.
  1699. The Comtal is the default device if ARPA is the host machine,
  1700. or the 
  1701. .I -i, -g, -0, -1, -2
  1702. and 
  1703. .I -3
  1704. flags are used.
  1705. The Comtal is connected to the ARPA machine.
  1706. .TP 14
  1707. -G
  1708. Display the plot on the Grinnel connected to the ARPA
  1709. machine.
  1710. The default action is to display the plot on graphics
  1711. overlay 0 unless the -0, -1, -2, -3 or -i flags are used.
  1712. A Grinnell is connected to the ARPA and the PB machines.
  1713. .TP 14
  1714. -i
  1715. Display the plot on an image plane instead of a graphics overlay.
  1716. This flag is the opposite of the 
  1717. .I -g
  1718. flag.
  1719. If this flag is used then the Comtal (
  1720. .I -c
  1721. ) is the default device.
  1722. .TP 14
  1723. -g
  1724. Display the plot on a graphic overlay instead of an image plane.
  1725. This flag
  1726. is set by default if ARPA is the host machine.
  1727. This flag is the opposite of the 
  1728. .I -i
  1729. flag.
  1730. If this flag is used then the Comtal (
  1731. .I -c
  1732. ) is the default device.
  1733. .TP 14
  1734. -n
  1735. The plot is displayed on the graphic overlay 
  1736. or image plane 
  1737. .I n.
  1738. The number 
  1739. .I n 
  1740. can be either 0,1, 2, 3.
  1741. If this flag is used then the Comtal (
  1742. .I -c
  1743. ) is the default device.
  1744.  
  1745. .RS 0
  1746. .ne 8
  1747. **** AXIS OPTIONS ****
  1748. .TP 14
  1749. -a
  1750. No axes will be plotted.
  1751. .TP 14
  1752. -A
  1753. Plot axes.
  1754. This option is set by default.
  1755. .TP 14
  1756. xlen=r
  1757. The length of the x axis will be changed from eight
  1758. plot units to r units.
  1759. .TP 14
  1760. ylen=r
  1761. The length of the y axis will be changed from eight
  1762. plot units to r units.
  1763. .TP 14
  1764. len=r
  1765. Set the length of both axes to r.
  1766. .TP 14
  1767. logx=n
  1768. The `x' axis will be logarithmic instead of linear.
  1769. Valid values for n are -3, -2, -1, 1, 2, and 3.
  1770. The
  1771. logarithm base ten of the `x' vector will be taken if n
  1772. is negative.
  1773. No tic marks will be plotted if n is -1
  1774. or 1.
  1775. A few tic marks will be plotted if n is -2 or 2.
  1776. All possible tic marks will be plotted if n is -3 or 3.
  1777. .TP 14
  1778. logy=n
  1779. Same as the `logx=' option except 
  1780. that it works for the `y' axis.
  1781. .TP 14
  1782. raxis=xy
  1783. Floating point (real) numbers will be used to label the axis.
  1784. If just `x' is specified then only the x-axis will be forced to floating
  1785. point notation.
  1786. If just `y' is specified then only the y-axis will be forced to floating
  1787. point notation.
  1788. If `xy' is used then both the x and the y-axis will be forced to floating
  1789. point notation.
  1790. The default notation is determined by the type of data used as input
  1791. to the program.
  1792. If integer data is used as input then the axis will be labelled with
  1793. integers.  Otherwise floating point notation is used.
  1794. .TP 14
  1795. dig=n
  1796. The number of significant digits used in the annotation
  1797. of the axes will be set to 'n'.
  1798. The default value is
  1799. six significant digits.
  1800. .TP 14
  1801. xdig=n
  1802. Set the number of significant digits in the x axis to
  1803. n.
  1804. .TP 14
  1805. ydig=n
  1806. Set the number of significant digits in the y axis to
  1807. n.
  1808. .TP 14
  1809. tic=r
  1810. The distance between tic marks for both the x and the y
  1811. axes will be changed to r.
  1812. The default value of r is
  1813. one.
  1814. .TP 14
  1815. xtic=r
  1816. Set only the x tic mark distance.
  1817. .TP 14
  1818. ytic=r
  1819. Set only the y tic mark distance.
  1820. .TP 14
  1821. -f
  1822. A border will be drawn around the plot.
  1823. .TP 14
  1824. -F
  1825. Don't frame the plot.
  1826. This option is set by default.
  1827.  
  1828. .RS 0
  1829. **** LABEL OPTIONS ****
  1830. .TP 14
  1831. el=str
  1832. The string will be plotted just to the right of the
  1833. last point in the line.
  1834. .TP 14
  1835. tl=str
  1836. The string will be used as a label at the top of the
  1837. graph.
  1838. .TP 14
  1839. bl=str
  1840. The string will be used as a label at the bottom of the
  1841. graph.
  1842. .TP 14
  1843. xl=str
  1844. The character string is used as a label below the x
  1845. axis.
  1846. .TP 14
  1847. yl=str
  1848. The character string is used as a label next to the y
  1849. axis.
  1850. .TP 14
  1851. -l
  1852. The user will be prompted for labels not entered with
  1853. the `xl' and `yl' options.
  1854. .TP 14
  1855. -L
  1856. Don't prompt for labels.
  1857. This option is the default.
  1858.  
  1859. .RS 0
  1860. **** LINE OPTIONS ****
  1861. .TP 14
  1862. -m
  1863. Mark every point in the line with an on-center symbol.
  1864. .TP 14
  1865. -M
  1866. Don't mark the line.
  1867. This option is set by default.
  1868. .TP 14
  1869. j=n
  1870. Only every |j|'th point will have an on-center symbol
  1871. on it.
  1872. If j is negative, then the line connecting
  1873. points will not be drawn.
  1874. This option invokes the -m
  1875. flag.
  1876. .TP 14
  1877. sym=n
  1878. One of 13 different on-center symbols can be selected.
  1879. This option invokes the -m flag.
  1880. The following on-center symbols can be used.
  1881. .ta 1i 2i
  1882. .nf
  1883.     \fIsym    on-center symbol\fR
  1884.  
  1885.      0    no on-center symbol
  1886.      i    $'i-1'    i=1,2,...,10
  1887.     11           $*
  1888.     12           $+
  1889.     13           $,
  1890. .fi
  1891. .TP 14
  1892. -d
  1893. A dashed line is used instead of a solid line when
  1894. drawing the graph.
  1895. .TP 14
  1896. -D
  1897. Don't draw dashed line.
  1898. This option is set by default.
  1899. .TP 14
  1900. dash=r
  1901. The length of the visible portion of the dashed line is
  1902. set to `r'.
  1903. The default value is 0.1.
  1904. This option
  1905. invokes the `-d' flag.
  1906. .TP 14
  1907. gap=r
  1908. Same as the `dash=' option but affects the invisible
  1909. portion of the dashed line.
  1910. .TP 14
  1911. -z
  1912. A bar graph is made instead of connecting vector
  1913. elements with a solid line.
  1914. .TP 14
  1915. -Z
  1916. Don't draw bar graph.
  1917. This option is set by default.
  1918. .PP
  1919. The parse routines internal to 
  1920. .B qplot
  1921. allow for two default
  1922. mechanisms to specify options.
  1923. The first method is to create a
  1924. file `.qplotrc' in your HOME directory (see environ (5)).
  1925. In it,
  1926. one can place options and flags that 
  1927. .B qplot
  1928. will use before it
  1929. parses your command line.
  1930. The syntax is one command or flag
  1931. string per line.
  1932. .PP
  1933. As an example, consider the case where the user wishes to
  1934. always obtain output on the Versatec and the plot be framed.
  1935. Also
  1936. the length of the axes are desired to be 6 units and the number
  1937. of digits in the axes annotation set to 4.
  1938. The correct format for
  1939. the file `.qplotrc' would be:
  1940. .RS 1i
  1941.  -vf
  1942.  len=6
  1943.  dig=4
  1944. .RE
  1945. .PP
  1946. The second method to set default options is to set the
  1947. environment variable `QPLOTARGS'. The format of `QPLOTARGS' is the
  1948. same as the input command line.
  1949. .PP
  1950. The options set in the previous example can be set using the
  1951. following procedure:
  1952. .PP
  1953. For /bin/sh:
  1954.     $QPLOTARGS='-vf len=6 dig=4'
  1955.     $export QPLOTARGS
  1956. .PP
  1957. For /bin/csh
  1958.     $setenv QPLOTARGS '-vf len=6 dig=4'
  1959. .PP
  1960. If you need to set up labels with the `xl=', `yl=', `bl=', `tl=',
  1961. or `el=' options, surround the respective option with double
  1962. quotes. An example:
  1963.  
  1964.     $QPLOTARGS='-vf "xl=this is the x axis label"'
  1965.  
  1966. There is no way to get a double quote into the label field.
  1967. .PP
  1968. .B Qplot
  1969. will parse the file `.qplotrc' first, if it exists.
  1970. Then
  1971. it will parse `QPLOTARGS', if it exists. 
  1972. Finally, 
  1973. .B qplot
  1974. will parse
  1975. the command line.
  1976. .SH SEE ALSO:
  1977. graphics/crc
  1978. .SH FUTURE
  1979. Eventually all devices except for plot format will be phased out.
  1980. It is not practical for 
  1981. .I qplot 
  1982. to know about every possible output device.
  1983. Instead it is better that 
  1984. .I qplot
  1985. output a generic format with infinite resolution and 
  1986. let each device filter produce the best plot possible.
  1987. .SH AUTHOR
  1988. Carl Crawford
  1989. .SH FILES
  1990. .TP 14
  1991. /etc/cpu
  1992. Contains name of host
  1993. .SH APPENDIX: Input file conventions
  1994. .PP
  1995. .B Qplot
  1996. users should write the data for the `x' and `y' files
  1997. in binary format to make the most efficient use of the machine.
  1998. This format will be explained in detail in this appendix for the
  1999. benefit of users who have had little or no experience with binary
  2000. files.
  2001. .PP
  2002. The normal output mode from programs is what will be called an
  2003. ASCII or displayable format. This type of output can be directed
  2004. to the terminal for inspection by the user. The output is
  2005. generated with a 
  2006. .B formatted
  2007. write.
  2008. This type of data can be read by 
  2009. .B qplot
  2010. using the ',a' modifier to the file name.
  2011. .PP
  2012. Internally a program assigns a certain number of bytes to each
  2013. variable used. When a formatted 
  2014. .B write
  2015. is initiated, the number is
  2016. converted from the internal binary representation to a string
  2017. containing displayable ASCII characters.
  2018. When sending data
  2019. between programs, it is a waste of time to convert data from
  2020. binary to ASCII and then from ASCII back into binary.
  2021. This is the
  2022. reason why 
  2023. .B qplot
  2024. encourages binary data as input.
  2025. .PP
  2026. Each programming language's internal variable types map into a
  2027. .B qplot
  2028. byte declaration field.
  2029. The following list gives the
  2030. correspondence between the internal variable types and the 
  2031. .B qplot
  2032. byte declaration for some of the commonly used languages on the
  2033. UNIX operating system.
  2034. .nf
  2035. .ta 0.3i 1.5i 3.4i 4.6i
  2036.  
  2037.     C: (11's)        C: (Vax)
  2038.     
  2039.     TYPE    DECLARATION    TYPE    DECLARATION
  2040.     short    i or s    short    s
  2041.     int    i or s    int    i or l
  2042.     long    l    long    i or l
  2043.     float    f    float    f
  2044.     char    c or cs    char    c or cs
  2045.     double    d    double    d
  2046.     
  2047.     
  2048. .ne 8
  2049.     FORTRAN:(F77)        FORTRAN: (F4P)
  2050.     
  2051.     TYPE    DECLARATION    TYPE    DECLARATION
  2052.     integer    l    byte    c or cs
  2053.     integer*2    s    real    f
  2054.     real    f    double    d
  2055.     double    d    integer    s or i
  2056.     character*1    c or cs    integer*4    l
  2057.     
  2058.     
  2059.     APL: (APL)        APL: (APL2)
  2060.  
  2061.     TYPE    DECLARATION    TYPE    DECLARATION
  2062.     numeric    d    numeric    f
  2063.     character    c or cs    character    c or cs
  2064.  
  2065.  
  2066.  
  2067.      PASCAL (11's)        PASCAL (Vax)
  2068.  
  2069.     TYPE    DECLARATION    TYPE    DECLARATION
  2070.     integer    s or i    integer    l or i
  2071.     real    f    real    f
  2072.  
  2073. .fi
  2074. .PP
  2075. Unformatted writes in C can be obtained using the 
  2076. .B fwrite
  2077. subroutine. See stdio(3) for more information.
  2078. .PP
  2079. In FORTRAN using the F77 compiler there are two ways to obtain
  2080. unformated writes.
  2081. The first is to use the 
  2082. .B ucreat 
  2083. and 
  2084. .B uwrite
  2085. subroutines.
  2086. They are the analog to C's 
  2087. .B write
  2088. and 
  2089. .B creat
  2090. subroutines.
  2091. See the documentation for the C versions for more
  2092. information on the syntax.
  2093. When compiling your program 
  2094. add `-lU77' to the end of the command line.
  2095. .PP
  2096. The easiest way to get unformated writes from FORTRAN is to
  2097. just write the data without a `format' statement.
  2098. An example
  2099. would be:
  2100. .nf
  2101.     real x(100),y(100)
  2102.  
  2103.     write(2)x
  2104.     write(3)y
  2105.  
  2106. .fi
  2107. In this example two files would be generated 
  2108. named `fort.2' and `fort.3'. 
  2109. The F77 compiler also generates code to produce record
  2110. counts in its binary files.
  2111. The program strip7(1) will remove
  2112. the record counts from  binary files generated with F77.
  2113. The
  2114. output file names can be changed using the 
  2115. FORTRAN subroutine 
  2116. .B open. 
  2117. See the compiler manual for more information.
  2118. SHAR_EOF
  2119. chdir ..
  2120. #    End of shell archive
  2121. exit 0
  2122.  
  2123. -- 
  2124.  
  2125. Rich $alz            "Anger is an energy"
  2126. Cronus Project, BBN Labs    rsalz@bbn.com
  2127. Moderator, comp.sources.unix    sources@uunet.uu.net
  2128.