HTML-IMAGE.nr 0C 0 HTML-IMAGE-END.lf 1 - HTML-IMAGE.nr 0C 0 HTML-IMAGE-END.ce SPECPR Gould Plotting Subroutines
0. Introduction
The Gould may be used to produce alphanumeric symbols, curves, or pictures by laying down a pattern of closely spaced "dots." The density of these is 200/inch or approximately 78.74/cm. The paper is 11 inches wide and of arbitrary length.
A set of fortran callable subroutines has been written
to provide a simple means for utilizing the Gould as a
plotting device. Since the Gould can move the paper only in
one direction it is necessary to create intermediate data
files on disk containing a representation of the plot to
allow for drawing the parts of the plot in any order. The
representation chosen was to represent each line of data as
it is actually sent to the Gould, with a zero bit meaning a
white dot, and a one bit meaning a black dot. Although this
requires a rather large file (
words/inch of vertical space
on the Gould), it permitted a more straightforward and rapid
implementation than with other schemes.
In order to produce a plot, using these subroutines, four main steps are involved. They are:
1. Prepare the disk file. 2. Initialize the origin and scale factors. 3. Plot the data, titles, axes, etc. to the file. 4. Dump the file to the plotter.
1. Preparing the File
A subroutine named SETUP must be called first before any others in the plot collection. Its function is to setup the vector and text intermediate disk files. SETUP also calculates the value of several parameters which are required for the proper functioning of the other subroutines. These parameters are stored in common areas named PLOT01 and PLOT02, which should be separate from the named common in the user’s routines.
The arguments to SETUP are as follows: The logical unit number to which status and error messages are to be sent. The id under which the disk file is to be assigned. The disposition (2 characters) The maximum vertical dimension of the plot (in cm.), up to 200 cm. The maximum horizontal dimension of the plot (in cm.) up to 27 cm. error status
Initially the disposition is "NE" for new or "RE" for replace. Subsequently it may be "OL" for a file which already exists and which is to be re-plotted.
Ex: CALL SETUP (6, ’X’, ’PLDATA’, ’RE’, 20.6, 27.0, IER)
2. Scaling the Data
After SETUP has been called, a centimeter coordinate system is automatically established with the upper left corner of the paper being (0., 0.) and the horizontal and vertical limits being the values given as the last two arguments to SETUP. The positive directions are to the right and downwards respectively.
In general the user’s data values are not in centimeters and rather than having to convert them, a subroutine named RANGE has been provided to do the job. Its arguments are the centimeter coordinates of two arbitrary points on the user’s plot and the corresponding data values. Figure 6.1 should make this clear:
Two arbitrary points are chosen (labeled
and
) and their values are given
as the following arguments to RANGE: The data value of
in the vertical direction.
(shown as
) The data value
of
in the horizontal
direction (shown as
) The
centimeter coordinate of
in
the vertical direction (shown as
) The centimeter
coordinate of
in the
horizontal direction (shown as
) Same as dndt1 but for
Same as acdt1 but for
Same as dncm1 but for
Same as accm1 but for

The only restriction is that
≠
.
Ex: CALL RANGE (X(1), Y(1), 2., 1.5, X(N), Y(N), 20.1, 26.5)
3. Generating the Pattern
The subroutines described in this section set the appropriate bits in the disk file to represent points, curves, and characters. Curves are composed of lne segments between the successive points. Most of the subroutines have an integer argument by which the user can choose the thickness of lines and the height of characters. A convention has been adopted such that if this integer is negative then the other arguments which give the position of the line or character, are in centimeters rather than in data units. This is convenient for referring to places on the outlying regions of the plot.
a. Points and Lines
Subroutine POINT permits the placement of a single point or a square matrix of points. Its arguments are: The vertical coordinate of the upper left corner. The horizontal coordinate of the upper left corner. The length of a side in Gould units (1 Gould unit = .005 in.).
e.g.:
CALL POINT (5., 4., -4)
CALL POINT (X, Y, 1)
Subroutine LINE may be used to draw lines or rectangles at any
angle. Its arguments are:
The vertical coordinate of one end of the line.
The horizontal coordinate of one end of the line.
The vertical coordinate of the other end of the line.
The horizontal coordinate of the other end of the line.
The thickness of the line in Gould units.
e.g.:
CALL LINE (X(I), Y(I), X(I+1), Y(I+1), 1)
CALL LINE (2., 1., 1.5, 4., -5)
b. Characters
Two subroutines are available-for plotting single symbols or strings of text.
Subroutine PLTSYM is used to mark one’s data points on the plot with "centered" symbols. Its arguments are:
The vertical coordinate of the center of the symbol. The horizontal coordinate of the center of the symbol. The size of the symbol as a multiple of 8 Gould units. The symbol number is chosen from figure 6.2.
Subroutine SYMBOL is used to write text to the plot file. Its arguments are:
The vertical coordinate of the lower left corner of the first character. The horizontal coordinate of the lower left corner of the first character. The height of the characters as a multiple of 10 Could units. The array of characters to be plotted. The angle (in degrees) at which they are to be plotted with 0° being vertical and 90° being horizontal. The number of characters in string to be plotted.
e.g.: CALL SYMBOL (2.5, 1.5, -1, 16HThis is a Sample, 60., 16)
Subroutine SYMBOL recognizes six special characters which can occur in the text array passed to it (the 4th argument). These are:
HTML-IMAGE.nr 3c 0
Character
Effect
\\ (Backslash) Backspace to previous character
{ (Left Brace) Go into subscript mode
} (Right Brace) Go into superscript mode
@ (At sign) End last scripting mode
! (Exclaimation Point) Toggle greek/normal mode
| (Vertical Bar) Toggle math/normal mode
HTML-IMAGE-END As it was assumed that these characters would not need to be printed they have been reserved for the above special use. Backslash can be used to cause characters to be overprinted. At-sign terminates the last use of a brace. All characters in between are printed in script mode. c. Axes We consider an axis to be a horizontal or vertical line between two points, having a sequence of short line segments at right angles. These segments, called tic-marks, may have the value of the varying coordinate indicated above or below them, and a title can be written above or below the axis. It is possible for the user to write his own axis drawing routine using only the LINE and SYMBOL subroutines, but it would be inconvenient to determine the exact location of the tic-marks and their values. It is easier to use the AXIS subroutine, however one must accept the conventions which were adopted. The arguments to AXIS and the conventions are as follows: The vertical coordinate of one end of the axis, in data units. The horizontal coordinate of one end of the axis, in data units. The vertical coordinate of the other end of the axis, in data units. The horizontal coordinate of the other end of the axis, in data units. An array of characters for the title. The number of characters in wlabel. If zero then no title or tic-mark labeling will be drawn. The minimum spacing of the tic-marks in cm. For a horizontal axis, dn1 = dn2 while for a vertical
axis, acr1 = acr2. The tic marks will be drawn from the axis
to the direction of the center of the plot, and will be
either 36 or l8 Gould units in length, the longer one being
used for labeled tic-marks and the shorter one for unlabeled
tic-marks. Tic-marks will be drawn only at intervals which
are 1, 2, or 5 times a power of 10, for example .02, 50,
e.g.: CALL AXIS (-.2, 1., -.2, 11., 8HX - AXIS, 8, 1.) 4. Dumping the Plot File to the Gould Once the plot file has been filled with the picture to be drawn it must be sent to the Gould. Subroutine DONE closes the text and vector intermediate files. The program PLOTDAEMON reformats the text and vector files into the binary image of the plot which it then sends to the Gould plotter. The arguments of subroutine DONE are: A dummy argument. No longer used. A dummy argument. No longer used. |