home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!rs
- From: rs@uunet.UU.NET (Rich Salz)
- Newsgroups: comp.sources.unix
- Subject: v10i047: CRC Plotting Package, Part03/06
- Message-ID: <606@uunet.UU.NET>
- Date: 9 Jul 87 01:14:27 GMT
- Organization: UUNET Communications Services, Arlington, VA
- Lines: 2020
- Approved: rs@uunet.UU.NET
-
- Submitted-by: "Wombat" <rsk@j.cc.purdue.edu>
- Posting-Number: Volume 10, Issue 47
- Archive-name: crc_plot/Part03
-
-
-
- # This is a shell archive.
- # Remove everything above and including the cut line.
- # Then run the rest of the file through sh.
- #----cut here-----cut here-----cut here-----cut here----#
- #!/bin/sh
- # shar: Shell Archiver
- # Run the following text with /bin/sh to create:
- # doc
- mkdir doc
- chdir doc
- cat << \SHAR_EOF > alpha.3g
- .TH ALPHA 3g "CRC Graphics Package"
- .SH NAME
- alpha - Return Tektronix to alpha-numeric mode
- .SH SYNOPSIS
- .nf
- >From C:
- alpha()
-
- >From F77:
- call alpha
- .fi
- .SH DESCRIPTION
- The software leaves the Tektronix in the plot state after
- each subrotuine call.
- If the user writes to the terminal
- without a proceeding the write with a call to
- .I alpha,
- the Tektronix will think that the alpha-numeric data
- from the user is valid plot information.
- Garbage graphics will result.
- .PP
- The terminal remains in an alpha-numeric state until
- the next graphics call.
- .PP
- A call to
- .I alpha
- when plotting
- on the HP plotter will cause the software
- to flush its internal output buffers.
- This allows for pseudo interactive plotting
- on the HP plotter.
- SHAR_EOF
- cat << \SHAR_EOF > axis.3g
- .TH AXIS 3g "CRC Graphics Package"
- .SH NAME
- axis - Draw axis
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y,size,min,max;
- int xy,flag;
- char *label;
-
- axis(x,y,label,xy,size,min,max,flag);
-
- >From F77:
- real x,y,size,min,max,
- integer xy,flag
- character label()
-
- call axis(x,y,label,xy,size,min,max,flag)
- .fi
- .SH DESCRIPTION
- To draw a labeled coordinate axis with numerically annotated
- tic-marks at one unit intervals.
- .PP
- The following parameters are used to specify the details of the axis.
- .TP 14
- x, y
- the coordinates (in plot units) of the starting point
- of the axis.
- .TP
- label
- a pointer to a zero terminated string which is to be used
- as an axis label.
- .TP
- xy
- One of the following four values indicate the direction and
- orientation of the axis.
- .br
- 0: plot axis at zero degrees, tic marks below the axis.
- .br
- 1: plot axis at ninety degrees, tic marks left of the axis.
- .br
- 2: plot axis at zero degrees, tic marks above the axis.
- .br
- 3: plot axis at ninety degrees, tic marks right of the axis.
- .TP
- size
- the length (in plot units) of the coordinate axis.
- .TP
- min
- the numerical value corresponding to the first tic-mark
- of the axis (at the point (x,y)), usually the same
- as the value computed by 'scale'.
- .TP
- max
- The numerical value corresponding to the last tic-mark of
- the axis.
- .TP
- flag
- if flag is positive, the numerical values calculated for
- the tic-marks will be truncated to form integers.
- If flag is zero, the annotations will be floating point.
- If flag is negative, no numerical annotation will be done.
- .SH REMARKS
- The distance between tic-marks can be changed by setting
- the variable
- .I ticdis
- to the desired distance using subroutine
- .I axisv.
- Ticdis will be adjusted so that it is an integer divisor
- of size.
- If ticdis is too small, the annotations at the tic-marks
- will run over each other.
- .PP
- When integer annotations are desired, (
- .I max - min
- ) should be
- divisible by (
- .I size / ticdis
- ) to prevent truncation errors.
- .PP
- When the tic numerical values become very small or very large (in
- absolute value), the values will be converted into base ten
- mantissa and characteristic notation with the characteristic
- appended to the label.
- .PP
- The axis itself starts at (x,y) and all the labeling appears
- below, next to, or above it. Be sure to allow space for
- the labeling.
- .PP
- The number of significant digits used in the annotations can
- be changed by setting the variable
- .I digits
- to the number
- of digits desired using the
- .I axisv
- subroutine.
- SHAR_EOF
- cat << \SHAR_EOF > axisv.3g
- .TH AXISV 3g "CRC Graphics Package"
- .SH NAME
- axisv - change parameters of axis
- .SH SYNOPSIS
- .nf
- >From C:
- float ticdis;
- int digits;
-
- axisv(ticdis,digits);
-
- >From F77:
- real ticdis
- integer digits
-
- call axisv(ticdis,digits)
- .fi
- .SH DESCRIPTION
- To change the default distance between axis tic marks and the number
- of significant digits in the numerical annotations.
- The parameters are as follows
- .TP 10
- ticdis
- the distance (in plot units) between tic-marks on the axis.
- .TP
- digits
- the number of significant digits in the numerical annotation
- .SH REMARKS
- The default values for ticdis and digits are 1.0 and 6, respectively.
- .PP
- The values will be in effect until the next call to
- .I axisv
- for all
- subsequent calls to
- .I axis
- and
- .I laxis.
- .PP
- The
- .I axis
- subroutine will modify
- .I ticdis
- so that
- the length of the axis divided by
- .I ticdis
- is
- an integer.
- .SH SEE ALSO
- axis(3g),
- laxis(3g)
- SHAR_EOF
- cat << \SHAR_EOF > crclabel.1g
- .TH CRCLABEL 1 "CRC Graphics"
- .SH NAME
- crclabel - Label a CRC plot
- .SH SYNOPSIS
- crclabel [arguments]
- .SH DESCRIPTION
- .B Crclabel
- is used to add additional labels to a CRC plot.
- The
- .I xp
- and
- .I yp
- parameters are used to set the location of the
- text specified by the
- .I tl
- option.
- .I Qplot(1)
- style arguements are used to specify the device where the text
- is to be written.
- .PP
- .B Crcplot
- generates a plot on
- the default Printronix line printer as defined in
- .B gplp
- (1).
- If ARPA is the host machine, the output will appear on
- the Comtal graphics overlay bit-plane zero.
- .PP
- The following options are
- available to modify the graph:
-
- **** POSITIONING AND REDUCING OPTIONS ****
- .TP 14
- xp=r
- The x starting coordinate of the text is moved to
- position r.
- The default value of r is zero.
- .TP 14
- yp=r
- Same as the `xp=r' flag but the y origin of the text is moved to r.
- .TP 14
- scfac=r
- The graph is expanded or reduced in size by r.
- The
- default value is 1.0.
-
- .RS 0
- **** DEVICE SELECTION OPTIONS ****
- .TP 14
- -c
- The plot is displayed on a Comtal image instead of a
- graphic overlay.
- The image that is currently being
- displayed is used unless the -n flag is used.
- .TP 14
- -g
- Display the plot on a Comtal graphic overlay.
- This flag
- is set by default if ARPA is the host machine.
- The
- Comtal is connected to the ARPA machine.
- .TP 14
- -n
- The plot is displayed on the Comtal's graphic overlay n
- or Comtal image n.
- N can be either 0,1, or 2.
- .TP 14
- -G
- Display the plot on the Grinnel connected to the ARPA
- machine.
- .TP 14
- -t
- Display the plot on a Tektronix 4010 or 4014 display.
- Standard output must end up on the specified terminal.
- .TP 14
- -T
- Display the plot on a Retro-Graphics RG-512 in
- conjunction with an ADM-3A terminal.
- .TP 14
- -h
- Display the plot on an HP plotter.
- .TP 14
- pen=n
- When using the HP plotter, the pen in bin n is used to
- plot the graph.
- The default bin is 1.
- This invokes the `-h' flag.
- .TP 14
- speed=n
- The HP plotter's pen movement velocity will be changed
- to `n' cm/sec.
- The valid range for n is [1,36].
- The
- default value is 36.
- This option will invoke the `-h'
- flag.
- .TP 14
- -p
- The plot is sent to the Printronix line printer through
- .B gplp
- (1).
- This is the default output option for all
- host machines except for ARPA.
- See
- .B gplp
- (1) to
- determine to which network line printer the output
- will be sent.
- .TP 14
- site=XX
- The output is sent to the network line printer
- specified by XX.
- See
- .B opr
- (1) for more information
- about the allowable printer names.
- This option invokes
- the `-p' flag.
- .TP 14
- -v
- The plot is sent to the alternate Versatec through a
- pipe to gp (1).
- .TP 14
- -o
- The graph is written out to standard output.
- .TP 14
- g=file
- The graph is written out to a file named `file'.
- This
- file can be sent to the Versatec or Printronix with
- .B gp
- (1) and
- .B gplp
- (1), respectively.
- .TP 14
- op=str
- The string is appended to the call to
- .B gplp, gp, hpd,
- and
- .B gd.
- This provides a method to change any of
- the options to the driver programs.
- .TP 14
- -b
- The display device is not blanked before plotting.
- This
- option has no effect when used with the `h', `v', `V',
- and `p' flags.
- If the `g=file' option is used
- and `file' exists in the local directory before plotting
- begins, then the new graphics will overlay the graphics
- contained in `file'.
- .TP 14
- -B
- Turn off the -b flag.
- This option is set by default.
-
- .RS 0
- **** LABEL OPTIONS ****
- .TP 14
- tl=str
- The string will be used as a label.
- The string will be placed at the position on the screen indicated
- by the
- .I xp
- and
- .I yp
- parameters.
- .PP
- The parse routines internal to
- .B crclabel
- allow for two default
- mechanisms to specify options.
- The first method is to create a
- file `.crclabelrc' in your HOME directory (see environ (5)).
- In it,
- one can place options and flags that
- .B crclabel
- will use before it
- parses your command line.
- The syntax is one command or flag
- string per line.
- .PP
- As an example, consider the case where the user wishes to
- always obtain output on the Versatec.
- The correct format for
- the file `.crclabelrc' would be:
- .RS 1i
- -v
- .RE
- .PP
- The second method to set default options is to set the
- environment variable `CRCLABELARGS'. The format of `CRCLABELARGS' is the
- same as the input command line.
- .PP
- The options set in the previous example can be set using the
- following procedure:
- .PP
- For /bin/sh:
- $CRCLABELARGS='-v'
- $export CRCLABELARGS
- .PP
- For /bin/csh
- $setenv CRCLABELARGS '-v'
- .PP
- .B crclabel
- will parse the file `.crclabel' first, if it exists.
- Then
- it will parse `CRCLABELARGS', if it exists.
- Finally,
- .B crclabel
- will parse
- the command line.
- .SH SEE ALSO:
- graphics/crc
- qplot(1)
- .SH AUTHOR
- Hacked together by Malcolm
- .SH FILES
- .TP 14
- /etc/cpu
- Contains name of host
- .SH BINARIES
- This program has not been installed on the system.
- Currently it resides in "~malcolm/bin/crclabel" on the
- EC, ED, EE, EF and EG Vax computers.
- .SH SUPPORT
- This was a quick hack by Malcolm and will be supported on a time
- available basis by the author.
- All of the code was stolen directly from
- .I qplot.
- SHAR_EOF
- cat << \SHAR_EOF > dline.3g
- .TH DLINE 3g "CRC Graphics Package"
- .SH NAME
- dline - draw a parametric line
- .SH SYNOPSIS
- .nf
- >From C:
- float *x,*y,*dsh,*gap,lx,ly;
- int n,m;
-
- dline(x,y,n,dsh,gap,m,lx,ly);
-
- >From F77:
- real x(),y(),dsh(),gap(),lx,ly
- integer n,m
-
- call dline(x,y,n,dsh,gap,m,lx,ly)
- .fi
- .SH DESCRIPTION
- To draw a plot of a parametric relationship (x[i],y[i]),
- i=0,2,...,n-1, with a dashed line.
- The
- .I i=n'th
- and
- .I i=n+1'th
- elements of each array should represent the minimum and maximum values
- of the points in that vector.
- The user can call the routine
- .I scale(3g)
- to automatically find the minimum and maximum values.
- All data values are scaled to these values.
- .PP
- The following parameters are used to specify the line.
- .TP
- x,y
- pointers to arrays containing the x and y coordinates of a
- parametric relationship (x[i],y[i]).
- .TP
- n
- the number of points (x[i],y[i]) in the parametric relationship.
- .TP
- dsh
- a pointer to an array of length m containing the lengths of
- the sequence of dashes to be used in plotting the relationship.
- .TP
- gap
- a pointer to an array of length m containing the lengths of
- the sequence of spaces between dashes to be used in plotting the relationship.
- .TP
- m
- the number of dashes and gaps in the dash-gap sequence.
- .TP
- lx
- the length (in plot units) that (xmax - xmin) is mapped to in page
- coordinates.
- Should be the same value used in the axis subroutine.
- .TP
- ly
- the length (in plot units) that (ymax - ymin) is mapped to in
- page coordinates. Should be the value used in the axis subroutine.
- .SH REMARKS
- Arbitrarily complex dash-gap sequences may be specified.
- Dshline
- first plots a dash of length dsh[0], then a gap of length
- gap[0], then a dash of length dsh[1], etc. After plotting
- gap[m-1], the sequence is repeated starting again with dsh[0].
- .PP
- If
- .I m = 0, dsh
- and
- .I gap
- are ignored and the curve is plotted as
- a solid line curve with subroutine
- .I line.
- .PP
- The arrays pointed to by
- .I x
- and
- .I y
- must be dimensioned at least
- .I n+2,
- and the minimum and maximum values of each
- array must be stored in the
- .I n+1st
- and
- .I n+2nd
- array positions
- respectively.
- .PP
- An error will occur if xmin = xmax or ymin = ymax.
- SHAR_EOF
- cat << \SHAR_EOF > examples.8g
- .TH EXAMPLES 8g "CRC Graphics Package"
- .SH NAME
- examples - several examples using the CRC Grapics Package
- .SH "EXAMPLE 1"
- The first example will demonstrate the use of Qplot using
- the output from a FORTRAN program compiled with `f77'.
- Consider the following program:
- .nf
-
- real y1(100),y2(100),x(100),y3(100)
- open(unit=2,file='y1',status='new',form='unformatted')
- open(unit=3,file='y2',status='new',form='unformatted')
- open(unit=7,file='y3',status='new',form='unformatted')
- open(unit=4,file='x',status='new',form='unformatted')
- do 10 i=1,100
- x(i) = (i - 1) * 2.0 * 3.14159 / 99.
- y1(i) = sin(x(i))
- y2(i) = cos(x(i)) * 2.0
- if(i .lt. 50)then
- y3(i) = i
- else
- y3(i) = 100 - i
- end if
- 10 continue
- write(2)y1
- write(3)y2
- write(7)y3
- write(4)x
- end
-
- .fi
- .ti +5
- If the program is in a file `test.f', it should be compiled with:
- .nf
-
- $f77. test.f
-
- .fi
- .ti +5
- Execute the program with:
- .nf
-
- $a.out
-
- .fi
- .PP
- The program will generate four binary files in F77 binary format.
- The file `y1' will contain a sine wave. `y2' will have a
- cosine in it. The file `y3' will have a ramp in it. The last
- file, `x', will contain the points in which the sine and cosine
- were generated from. To convert the f77 binary format to standard
- UNIX binary, the following commands should be run:
- .nf
-
- $strip7 y1 y2 y3 x
-
- .fi
- .PP
- The following Qplot/Gplp sequence will plot the three
- curves on the Printronix line printer:
- .nf
-
- $qplot y=y1 x=x,4 digits=3 ylen=3.0 'xl=sin($wt)' g=g1
- $qplot y=y2 x=,4 digits=3 ylen=3.0 xlen=3.0 yp=4.5 \\
- 'yl=cos($wt)' xl=t g=g2
- $qplot y=y3 xmin=-1.0 xmax=1.0 len=3.0 yp=4.5 xp=5.0 digits=3 -r \\
- xtic=1.5 "xl=ramp function" g=g3
- $gplp g1 g2 g3
- $rm g1 g2 g3
-
- .fi
- .PP
- The output generated is listed on the following page.
- .bp
- .sp 6
- .ce
- Output from example 1
- .bp
- .SH "EXAMPLE 2"
- .PP
- This example demonstrates a simple user generated graphics
- program in FORTRAN.
- Consider the following program which writes it output on the HP plotter:
- .nf
-
- call plots(7,0)
- call plot(1.0,1.0,-3)
- call plot(8.0,0.0,2)
- call plot(8.0,8.0,1)
- call plot(0.0,8.0,1)
- call plot(0.0,0.0,1)
- call symbol(.5,4.0,.3,"graphics",0.0)
- call plot(0.0,0.0,999)
- end
-
- .fi
- .PP
- This program will plot a box with the word 'graphics'
- in the middle of it.
- It should be compiled with:
- .nf
-
- $f77 prog.f -i -lG
-
- .fi
- .PP
- To obtain the output use:
- .nf
-
- $a.out
-
- .fi
- The output generated is:
- .bp
- .SH "EXAMPLE 3"
- .PP
- This example will present a more complicated graphics program
- written in C.
- Consider the following program written in C:
- .nf
-
- #include <math.h>
-
- main(){
- int i;
- float x[631],y[631];
-
- plots(69,0,"ver");
-
- for(i=0;i<630;i++){ /* compute data */
- x[i] = cos(3.0 * i / 100) + 1.0;
- y[i] = sin(4.0 * i / 100);
- }
-
- scale(y,629); /* get scaling information */
- scale(x,629);
-
- plot(1.5,1.0,-3); /* move origin away from corner */
- axisv(2.0,3); /* change default ticdis and digits */
- axis(0.,0.,"x axis",0,8.,x[629],x[630],0);
- axis(0.,0.,"y axis",1,8.,y[629],y[630],0);
- plot(0.0,8.0,3); /* draw border */
- plot(8.0,8.0,2);
- plot(8.0,0.0,2);
- symbol(2.5,8.5,.2,"lissajous figure",0.0);
- line(x,y,629,0,8.0,8.0);
-
- plot(0.0,0.0,999); /* terminate plotting */
- }
-
- .fi
- .PP
- This should be compiled with:
- .nf
-
- $cc. prog.c -i -lG -lm
-
- .fi
- .PP
- To get the
- output on the Versatec, use:
- .nf
-
- $a.out
-
- .fi
- .PP
- The graphics output is listed on the following page.
- .bp
- .sp 5
- .ce
- Output from example 3
- SHAR_EOF
- cat << \SHAR_EOF > factor.3g
- .TH FACTOR 3g "CRC Graphics Package"
- .SH NAME
- factor - change scale factor
- .SH SYNOPSIS
- .nf
- >From C:
- float sf;
-
- factor(sf);
-
- >From F77:
- real sf
-
- call factor(sf)
- .fi
- .SH DESCRIPTION
- To provide for changing the scale factor, initially 1.0, for
- subsequent x and y coordinates.
- The
- .I sf
- parameters is
- the new scale factor to be used in scaling all subsequent
- x and y coordinates unless and until factor is called again.
- All plotting is scaled by this factor thus the user coordinates
- (x,y) are scaled to the point (sf*x,sf*y).
- SHAR_EOF
- cat << \SHAR_EOF > fname.3g
- .TH FNAME 3g "CRC Graphics Package"
- .SH NAME
- fname - change default file name
- .SH SYNOPSIS
- .nf
- >From C:
- char *name;
-
- fname(name);
-
- >From F77:
- character name()
-
- call fname(name)
- .fi
- .SH DESCRIPTION
- To change the default file name when the plots (3g) device is 0.
- The parameter
- .I name
- is a pointer to a zero terminated string containing the name of the file that
- the final graphics output will be written.
- If the name is "-", then the graphics output will be written out
- to standard output.
- .SH REMARKS
- .I Fname
- should be called before the call to
- .I plots.
- SHAR_EOF
- cat << \SHAR_EOF > fontinfo.8g
- .TH FONTINFO 8g "CRC Graphics Package"
- .SH NAME
- Character Font Information
- .SH DESCRIPTION
- The graphics package draws all of its own symbols.
- This allows the user great flexibility in the size and type of characters.
- The default character set is shown as an ADM-3A keyboard on the
- next page.
- The left hand side of each key is the character you would
- normally see. If the character on the left is preceded by a `$'
- then the character on the right is displayed.
- (Online a list follows. The first column is the normal character
- set and the second column is the alternate font.)
- .PP
- The `open sup' and `open sub' characters cause an effective
- half line shift up and down, respectively. The `close sup'
- and `close sub' negate the effects of the respective `open' commands.
- The `bs' character will back up one character. This allows for
- over-written characters. The `$:' character is a combination
- of a `bs' and an overbar
- and the `$;' character is a combination of a `bs' and an underbar.
- .PP
- The `$1' through `$0', `$,', `$*', and `$+' characters are all
- on-center symbols used for marking points in space.
- The rest of the characters assume that the lower left hand corner
- is the start of the character.
- .PP
- The actual character descriptions are the file:
- .nf
-
- /usr/lib/graphics/font.5x7.
- .fi
- .sp
- The routine
- .I symbol (3g)
- defaults to this file. The user can supply his/her own font file
- by using the `fontint' subroutine call.
- .PP
- A program called
- .I genfont
- is available
- to generate the font file from a set of ascii vector coordinates.
- .bp
- FONT CORRESPONDENCE
- .nf
-
- a alpha ; underscore
- A ALPHA + center +
- b beta @ @
- B BETA ` `
- c xi \\ \\
- C XI | integral
- d delta _ backspace
- D DELTA , center + bs o
- e epsilon < <=
- E EPSILON . bold .
- f phi > >=
- F PHI / divide
- g gamma ? ?
- G GAMMA 1 center ' bs O
- h eta 2 center DELTA bs '
- H ETA 3 center Y
- i iota 4 center X
- I IOTA 5 center diamond bs '
- j sigma 6 center up arrow
- J SIGMA 7 center X over/under bar
- k kappa 8 center Z
- K KAPPA 9 center X bs o
- l lambda 0 center box bs '
- L LAMBDA : overbar
- m mu * center *
- M MU - +-
- n nu = equivalent
- N NU [ half space down
- o omicron { half space up
- O OMICRON ] half space up
- p pi } half space down
- P PI ^ angstrom
- q theta ~ infinity
- Q THETA ! sqrt
- r rho " "
- R RHO # approx
- s sigma $ $
- S SIGMA % not equal
- t tau & mho
- T TAU ' degree
- u upsilon ( (
- U UPSILON ) )
- v partial
- V gradient
- w omega
- W OMEGA
- x chi
- X CHI
- y psi
- Y PSI
- z zeta
- Z ZETA
- .fi
- SHAR_EOF
- cat << \SHAR_EOF > gd.1g
- .TH GD 1g "CRC Graphics Package"
- .SH NAME
- gd - Image Processing Graphics Driver
- .SH SYNOPSIS
- gd [-bcGio0123] [-mHOST] [if=stdin]
- .SH DESCRIPTION
- .I
- Gd
- is an interface program between the output of the
- plotting subroutines and an image display device.
- Currently,
- .I gd
- supports Comtal and Grinnell image displays or
- graphics overlays.
- .PP
- The file:
- .sp
- /usr/lib/graphics/gd.site
- .sp
- contains information about which network machine
- has these devices.
- The file contains `local'
- if there are devices connected locally or the
- name of the HOST that does have the display devices.
- If
- .I gd
- can not run locally, then the graphics
- information is sent to:
- .sp
- HOST!/usr/lib/graphics/gd [-Gcio0123]
- .sp
- where HOST comes from either the file `gd.site' or from
- the option `-mHOST'. The mode is determined
- by the options the local Gd is invoked with.
- .PP
- If the
- .I -b
- flag is used the device is not cleared (blanked) before the graphical data
- is written on the screen.
- The
- .I if=file
- parameter specifies that
- the graphics information should be read from `file'.
- The
- default input mode is standard input.
- .PP
- The device to write on is determined by a combination of the
- default action and the flags specified on the command line.
- The default action is to write the image on the Comtal Graphics
- Overlay number 0.
- In addition
- on the Comtal it is possible to determine the current image number
- being displayed so when writing to a Comtal image plane (-ci) the
- default action is to write to that image.
- These actions can be modified by using the following options.
- .TP 10
- -c
- Write the data on the Comtal instead of the Grinnell.
- .TP
- -G
- Write the data on the Grinnell instead of the Comtal.
- .TP
- -g
- Write the data to a graphics overlay instead of an image plane.
- .TP
- -i
- Write the data to an image plane instead of a graphics overlay.
- .TP
- -[n]
- Write on either the image plane or graphics overlay labelled
- .I n.
- The digit
- .I n
- can be either 0, 1, 2 or 3.
- (Note that not all of the image processing hardware is configured
- with all 4 planes.)
- .SH FILES
- .TP 30
- /usr/lib/graphics/gd.site
- contains default site name
- .TP
- /etc/cpu
- contains local host name
- .TP
- /dev/Gr/[0123]
- Grinnell Image Planes
- .TP
- /dev/Gr/gov[0123]
- Grinnell Graphics Overlays
- .TP
- /dev/ct[012]
- Comtal images
- .TP
- /dev/ct/tc
- Comtal status
- .TP
- /dev/ct/gov[012]
- Comtal graphic overlays
- .SH AUTHOR
- Carl Crawford
- and Malcolm Slaney
- .SH SEE ALSO
- graphics/crc
- SHAR_EOF
- cat << \SHAR_EOF > gp.1g
- .TH GP 1g "CRC Graphics Package"
- .SH NAME
- gp - graphics plot to versatec
- .SH SYNOPSIS
- gp [-ahfi] [-mHOST] file1 file2 ... filen
- .SH DESCRIPTION
- This command is obsolete on all ECN machines except for
- ARPA.
- Users desiring output on other ECN versatec machines should
- use
- .I plot(5g)
- format and send the plot to the versatec using
- the
- .I plot(1g)
- command.
- .PP
- Gp copies graphic files to a Versatec plotter.
- The
- input files are `or'ed together to form one picture.
- The -i flag will force the first file to be read from standard input.
- .PP
- Gp can be initiated from any machine on the network.
- The output will
- come out on the Versatec connected to the ARPA machine.
- Also file names `0', `1', and `2'
- refer to the Comtal graphics overlays 0, 1, and 2,
- respectively.
- .PP
- The option -f produces 4:1 output only on the
- ARPA Versatec. The option -h, which is a
- default flag, produces 2:1 output.
- .PP
- The flag -s causes
- .I gp
- not to output the message given to the
- user when
- .I gp
- finishes.
- .PP
- The -m flag is used to change the name of the host where the
- output is sent to. The characters immediately after `m' form the name
- of the new site.
- As an example,
- the command "gp -marpa file" will always send the output
- to the Versatec on the ARPA machine.
- .SH FILES
- .TP 30
- /usr/lib/graphics/gp.site
- default site specifications
- .TP
- /etc/cpu
- contains local host name
- /dev/vc
- Versatec
- .SH AUTHOR
- Carl Crawford
- .SH SEE ALSO
- gplp(1),
- qplot(1),
- graphics/crc
- .SH NOTES
- The file `gp.site' contains the name of the machine where the
- output is routed. If the machine has a Versatec then the name
- should be `local #', where # is the length of the Versatec
- line buffer.
- For the ARPA Versatec, # is 132.
- SHAR_EOF
- cat << \SHAR_EOF > gplp.1g
- .TH GPLP 1g "CRC Graphics Package"
- .SH NAME
- gplp - graphics print on a line printer
- .SH SYNOPSIS
- gplp [-XX] [-i] file1 ... filen
- .SH DESCRIPTION
- .I Gplp
- copies graphic files to a Printronix line
- printer.
- The input files are `or'ed together to form one picture.
- The -i flag will force the first file to be read from standard input.
- .PP
- Depending on which host machine `gplp' is run from, the output will
- go to various line printers on the network.
- As of this date the following table
- indicates which host's Printronix will be used for each originating
- computer:
- .ta 1i 3i
- .nf
- ORIGINATING OPR SITE
- MACHINE -XX
- aa ep
- ca cp
- cb cp
- ea ep
- ec ep
- ed ep
- ee ep
- ef ep
- eg em
- ga ep
- gb ep
- ka ep
- ma mp
- mb mp
- pa pp
- pb pp
- pc pp
- eeg ep
- arpa ep
- .fi
- .PP
- The default site name can be changed using the
- -XX option.
- See
- .I opr(1)
- for more information about the
- valid printer sites.
- .SH FILES
- /usr/lib/graphics/gplp.site contains default site name
- .SH AUTHOR
- Carl Crawford
- .SH SEE ALSO
- qplot(1),
- gp(1),
- graphics/crc
- .SH NOTES
- The file `gplp.site' has the form `-XX<cr>', where XX is the
- name of the default line printer.
- SHAR_EOF
- cat << \SHAR_EOF > hpd.1g
- .TH HPD 1g "CRC Graphics Package"
- .SH NAME
- hpd - HP plotter driver
- .SH SYNOPSIS
- hpd [-mHOST] [device]
- .SH DESCRIPTION
- Hpd is an interface program between the output of the
- plotting subroutines and the HP plotter.
- It passes standard input to the plotter
- specified by the `device' field.
- Specification of a host with the `-m' flag
- will cause:
- .sp
- HOST!/usr/lib/graphics/hpd [device]
- .sp
- to be executed.
- Thus, any plotter on the network can be reached.
- .PP
- The default HOST is contained in the
- file:
- .sp
- /usr/lib/graphics/hpd.site.
- .sp
- The file contains `local' if there is a plotter on the
- machine or the name of a HOST that has
- a plotter.
- .PP
- The program will time out after 3 minutes after the
- plotter hangs.
- .PP
- This program unfortunately only knows about one plotter per machine.
- The
- .I plot(1g)
- routine in conjunction with the
- .I -P
- option to
- .I qplot
- or
- .I plot3d
- can be used to send output to the other plotter(s).
- .SH FILES
- .TP 30
- /usr/lib/graphics/hpd.site
- contains default site name
- .TP
- /dev/plt0
- default path to plotter
- .TP
- /etc/cpu
- contains local host name
- .SH AUTHOR
- Carl Crawford
- .SH SEE ALSO
- graphics/crc
- SHAR_EOF
- cat << \SHAR_EOF > laxis.3g
- .TH LAXIS 3g "CRC Graphics Package"
- .SH NAME
- laxis - draw a logarithmic axis
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y,size;
- int xy,logmin,logmax,flag;
- char *label;
-
- laxis(x,y,label,xy,size,logmin,logmax,flag);
-
- >From F77:
- real x,y,size
- integer xy,logmin,logmax,flag
- character label()
-
- call laxis(x,y,label,xy,size,logmin,logmax,flag)
- .fi
- .SH DESCRIPTION
- .I Laxis
- draws
- a labelled logarithmic coordinate axis with numerically
- annotated tic marks.
- The following parameters are used:
- .TP 10
- x,y
- the coordinates of the starting point
- of the axis.
- .TP
- label
- a pointer to a zero terminated string which is to be used
- as an axis label.
- .TP
- xy
- 0: plot the axis at zero degrees, tic marks below the axis.
- .br
- 1: plot the axis at ninety degrees, tic marks to the left of the axis.
- .br
- 2: plot the axis at zero degrees, tic marks above the axis.
- .br
- 3: plot the axis at ninety degrees, tic marks to the right of the axis.
- .TP
- size
- the length of the coordinate axis in plot units.
- .TP
- logmin
- the exponent corresponding to the first tic mark of the axis (at the
- point (x,y)), usually the floor of the min computed by 'scale'.
- .TP
- logmax
- the exponent corresponding to the last tic mark of the axis, usually
- the ceiling of the max computed by 'scale'.
- .TP
- flag
- 0: default, all logarithmic tic marks plotted.
- .br
- \+\/\- 1: no logarithmic tic marks plotted.
- .br
- \+\/\-\ \2: only the logarithmic tic marks \
- corresponding to 2 and 5 are plotted.
- .br
- \+\/\- 3: all logarithmic tic marks are plotted.
- .br
- If flag is negative, no numerical annotation will be done.
- .SH REMARKS
- The user must supply
- .I scale, line,
- .I and
- .I dline
- with the log base 10
- of the data to be plotted.
- Also, the min and max supplied to
- .I line
- and
- .I dline
- must be logmin and logmax, respectively.
- .SH AUTHOR
- Jeffery L. Gray
- SHAR_EOF
- cat << \SHAR_EOF > libinfo.8g
- .TH LIBINFO 8g "CRC Graphics Package"
- .SH NAME
- Library Information
- .SH DESCRIPTION
- The graphics library (/u/lib/libG.a) contains user callable
- subroutines for generating graphics.
- They all are callable from
- a program written in C or F77.
- The only restriction on the calling
- sequence is that
- .I plots
- is called before any other plot calls
- and `plot(0.0,0.0,999)' is the last call.
- It should be noted that
- after the plot is terminated,
- .I plots(3g)
- can be called again.
- .PP
- Here is a list
- of the available routines:
- .nf
- .ta 1i
- alpha returns Tektronix to alpha-numeric mode
- axis plots numerically annotated axes
- axisv set environment variables for \fIaxis\fR and \fIlaxis\fR
- dline same as \fIline\fR but plots with a dashed line
- factor change the scale factor of the plot
- fname set output file name when graphics device is a file
- laxis plots numerically annotated logarithmic axes
- line plots a line through a set of coordinate pairs
- newpen changes the pen on the HP plotter
- number provides formatted numeric labelling
- plot moves pen and terminates plotting
- plots initializes the plotting devices
- scale computes scale values for \fRline\fR, \fIdline\fR, and \fIsline\fR
- site change the default line printer name in link to Gplp
- sline same as \fIline\fR but can put on-center symbols on the line
- speed changes the plotting speed for the HP plotter
- symbol puts strings on the graph
- where returns current pen position and scale values
- .PP
- Compile your program with
- one of the following commands:
- .sp
- .nf
- From F77 (11's):
- $f77 prog.f -i -lG
- From F77 (Vax):
- $f77 prog.f -lG
- From C (11's):
- $cc prog.c -i -lG -lm
- From C (Vax):
- $cc prog.c -lG -lm
- .fi
- .SH SEE ALSO
- See the CRC Graphics Introduction for more information.
- SHAR_EOF
- cat << \SHAR_EOF > line.3g
- .TH LINE 3g "CRC Graphics Package"
- .SH NAME
- line - draw a parametric line
- .SH SYNOPSIS
- .nf
- >From C:
- float *x,*y,lx,ly;
- int n,bar;
-
- line(x,y,n,bar,lx,ly);
-
- >From F77:
- real x(),y(),lx,ly
- integer n,bar
-
- call line(x,y,n,bar,lx,ly)
- .fi
- .SH DESCRIPTION
- To draw a line of a parametric relationship (x[i],y[i]), i=0,2,...,n-1.
- The
- .I i=n'th
- and
- .I i=n+1'th
- elements of each array should represent the minimum and maximum values
- of the points in that vector.
- The user can call the routine
- .I scale(3g)
- to automatically find the minimum and maximum values.
- The following parameters are used:
- .TP 10
- x,y
- pointers to arrays containing the x and y coordinates of the
- parametric relationship (x[i],y[i]).
- .TP
- n
- the number of points in the parametric relationship.
- .TP
- bar
- normally a straight line is drawn between two points but if bar
- is non-zero, zero order interpolation will be used between points.
- .TP
- lx
- the length (in plot units) that (xmax - xmin) is mapped to in page
- coordinates.
- .TP
- ly
- the length (in plot units) that (ymax - ymin) is mapped to in
- page coordinates.
- .SH REMARKS
- The Xi's and Yi's need not represent plot coordinates in inches.
- .PP
- The minimum and maximum values for the arrays must be stored
- in the n+1st and n+2nd locations of the arrays respectively.
- This can be easily done using the
- routine
- .I scale(3g).
- .PP
- The point (x[i],y[i]) will be plotted at the page coordinates:
- .nf
-
- x = ((x[i] - x[n]) / (x[n+1] - x[n])) * lx
- y = ((y[i] - y[n]) / (y[n+1] - y[n])) * ly
-
- .fi
- relative to the current origin. Hence depending upon the location
- of the current origin, the adjusted minima need not actually be
- the minima of the data which is to be plotted so long as each point
- (x[i],y[i]) has page coordinates which lie within the plotting area.
- .PP
- An error will occur if xmin = xmax or ymin = ymax.
- .PP
- The values of
- .I lx
- and
- .I ly
- are normally the values passed to
- the axis subroutines.
- SHAR_EOF
- cat << \SHAR_EOF > newpen.3g
- .TH NEWPEN 3g "CRC Graphics Package"
- .SH NAME
- newpen - change pens on the HP plotter
- .SH SYNOPSIS
- .nf
- >From C:
- int n;
-
- newpen(n);
-
- >From F77:
- integer n
-
- call newpen(n)
- .fi
- .SH DESCRIPTION
- To deselect the current pen and select one of the other
- pens in the HP plotter.
- The command is ignored if the HP plotter is not the selected
- output device.
- .I N
- should be set to
- the bin number of the new pen, n=1,2,3,4, which is to be
- selected.
- .SH REMARKS
- Initially, pen 1 is selected.
- When a pen is selected, the current pen is raised and the newly
- selected pen is left in the up position.
- .PP
- If n is the number of the currently selected pen, it is raised
- and left in the up position.
- SHAR_EOF
- cat << \SHAR_EOF > number.3g
- .TH NUMBER 3g "CRC Graphics Package"
- .SH NAME
- number - provide numeric labelling on plots
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y,height,angle;
- char *format;
- (num type must conform with format)
-
- number(x,y,height,angle,format,num);
-
- >From F77:
- real x,y,height,angle
- character format()
- (num type must conform with format)
-
- call number(x,y,height,angle,format,num)
- .fi
- .SH DESCRIPTION
- This routine plots a single number.
- It is usually used as part of plotting the axis and the
- following parameters are used.
- .TP 10
- x,y
- the coordinates of the point where the
- lower left corner of the first character is to be plotted.
- .TP
- height
- the height (in plot units) of the alphanumeric character
- string.
- .TP
- angle
- the angle (in degrees) counterclockwise from the +x direction
- at which the string is to be plotted.
- .TP
- format
- a pointer to a zero terminated string which contains the `C format'
- by which num is to be converted for plotting.
- .TP
- num
- the number whose value is to be plotted.
- .SH REMARKS
- >From f77 integers must be printed out using the `c' format %ld, since fortran
- integers are two bytes.
- .PP
- The width of the characters is four-sevenths of height and they
- are spaced at intervals of six-sevenths of height. The space
- between characters is two-sevenths of height.
- .PP
- A second set of characters can be accessed by preceeding a valid
- character with a `$'. A `$' can be obtained using `$$'. The second
- set contains Greek letters and some special mathematical
- symbols.
- See
- .I fontinfo(8g)
- for more information about this alternate
- character font.
- .PP
- See the documentation for
- .I printf(3)
- for more information on the
- syntax of the format statement
- .I number
- expects.
- SHAR_EOF
- cat << \SHAR_EOF > plot.3g
- .TH PLOT 3g "CRC Graphics Package"
- .SH NAME
- plot - move the pen
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y;
- int i;
-
- plot(x,y,i);
-
- >From F77:
- real x,y
- integer i
-
- call plot(x,y,i)
- .fi
- .SH DESCRIPTION
- To provide for moving the pen in a straight line from its
- current position to a new position, and for terminating
- the plotting subroutines.
- The following parameters are used.
- .TP 10
- x,y
- the coordinates of the point (in plot units) to which the
- pen is to be moved relative to the current origin.
- .TP
- i
- .nf
- +/- 1: do not change vertical position of pen.
- +/- 2: put pen into down position.
- +/- 3: put pen into up position.
- 999: terminate plot subroutines
- .fi
- .SH REMARKS
- .PP
- If
- .I i
- is +/- 1, +/- 2, or +/- 3, the pen is moved from
- its current position to the point (x,y) along a straight
- line with the vertical position of the pen as specified.
- .PP
- If
- .I i
- is -1, -2, or -3, the point (x,y) becomes the new
- origin for subsequent plotting. Unless and until the origin
- is again redefined, all future coordinates will specify
- positions with respect to this point.
- .PP
- If
- .I i
- is 999, the values of x and y are disregarded and may as
- well be `0.0'.
- An error will occur if subsequent plot calls are made
- prior to another call to
- .I plots.
- SHAR_EOF
- cat << \SHAR_EOF > plots.3g
- .TH PLOTS 3g "CRC Graphics Package"
- .SH NAME
- plots - initialize CRC Graphics Package
- .SH SYNOPSIS
- .nf
- >From C:
- int dev,overwrite;
- char *options;
-
- plots(dev,overwrite,options);
-
- >From F77:
- integer dev,overwrite
- char options()
-
- call plots(dev,overwrite,options)
- .fi
- .SH DESCRIPTION
- Plots is used to allocate buffers and initialize the devices
- before plotting can begin.
- Except for calls to
- .I site(3g)
- and
- .I fname(3g)
- this subroutine must be called
- before any other subroutines are called.
- The following parameters should be passed to
- .I plots.
- .TP 10
- dev
- The device the plot should be sent to. The following device
- numbers are currently supported (add 64 to the number in the table
- if the option string is used):
- .ta .1i 1i
- .nf
- 0 file or standard output
- 8 Versatec through gp(1g) (ARPA Machine Only!!!)
- 16 Printronix through gplp (1g) and opr (1g)
-
- 1 Comtal graphics overlay 0(*)
- 9 Comtal graphics overlay 1(*)
- 17 Comtal graphics overlay 2(*)
-
- 2 Comtal image image displayed(*)
- 10 Comtal image 0(*)
- 18 Comtal image 1(*)
- 26 Comtal image 2(*)
-
- 3 Grinnell graphics overlay 0(*)
- 11 Grinnell graphics overlay 1(*)
- 19 Grinnell graphics overlay 2(*)
- 27 Grinnell graphics overlay 3(*)
-
- 4 Grinnell Image being Displayed (*)
- 12 Grinnell Image Plane 0(*)
- 20 Grinnell Image Plane 1(*)
- 28 Grinnell Image Plane 2(*)
- 36 Grinnell Image Plane 3(*)
- 44 Grinnell Image Plane 4(*)
-
- 5 Plot Subroutines through plot(I)
-
- 6 Tektronix through standard output
- 14 Retro-Graphics through standard output
- 22 Tektronix 4113
-
- 7 HP through /u/lib/graphics/hpd
- .fi
- The output to those devices marked (*) is sent via the
- .I gd(1g)
- program.
- .TP
- overwrite
- If this parameters is zero then
- the specified device will be cleared before plotting.
- Otherwise (if overwrite is non zero) then the new plot will overwrite whatever
- is currently being displayed.
- .TP
- options
- A null terminated string that contains options for
- .I gplp(1g), hpd(1g), gd(1g)
- and
- .I plot(1g).
- The value passed as
- .I dev
- must be 64 plus the number found in the table above
- for this string to be used.
- When
- .I dev
- is equal to 69
- then the
- .I plot(5)
- output is automatically
- passed to
- .I plot(1g).
- The
- .I options
- string is appened to the string ``-T'' and the result
- is passed as the first argument to
- .I plot(1g).
- Thus use
- .I
- plots(69,0,"ver")
- \fRto use the Versatec through the
- .I plot(1g)
- program,
- .I
- plots(71,0,"eg")
- \fRto send a plot to the a HP plotter on the `eg' machine.
- .I plots(6,0)
- is also a valid plots call when the option string isn't needed.
- .SH REMARKS
- The default file name when
- .I dev
- equals zero can be changed using the
- subroutine
- .I fname.
- Also if the file
- exists in the
- local directory before plotting begins, then the
- new graphics will overlay the graphics contained in `file'.
- .PP
- For dev=printronix(16) there exists a subroutine
- .I site(3g)
- to change the
- name of the default line printer.
- .PP
- Space limitations occur on the PDP 11 computers
- when the device selected is a
- bit mode device (all dev numbers except for 3, 4, 11).
- For these devices the software has to allocate
- an 64K byte buffer. If your program has a lot of
- text and data, then the graphics software can't get
- its space. An error message will printed in these
- situations. When you are on the 11's try compiling
- your program with the loader option `-i' to get
- more space for data.
- .PP
- The origin is set to (0,0) before plotting begins. This
- coordinate is the lower left hand corner of the plot
- device.
- .PP
- The
- .I options
- field is an optional parameter.
- It is intended for advanced applications of the
- package with special emphasis placed on the
- network interface and future expansion of
- device daemons.
- .SH NOTE
- If the CRC-Graphics routines
- .I fname(3g)
- and
- .I site(3g)
- are needed then they
- must be called before the first call to
- .I plots(3g).
- SHAR_EOF
- cat << \SHAR_EOF > scale.3g
- .TH SCALE 3g "CRC Graphics Package"
- .SH NAME
- scale - find the minimum and maximum values of a vector
- .SH SYNOPSIS
- .nf
- >From C:
- float *a;
- int n;
-
- scale(a,n);
-
- >From F77:
- real a()
- integer n
-
- call scale(a,n)
- .fi
- .SH DESCRIPTION
- This routine is most often used to find the minimum and maximum values
- of a vector.
- The result is placed at the end of the vector in
- locations
- .I a[n]
- and
- .I a[n+1]
- (here the array subscripting is assumed to start from zero as in C).
- The first argument
- .I a
- is a pointer to an array
- and
- .I n
- is the number of points in the array.
- .SH REMARKS
- The array must be dimensioned at least n+2. The minimum value
- of the array is stored in a[n] and the maximum is stored in
- a[n+1].
- .PP
- In Fortran arrays are referenced starting from 1 so
- the minimum value is stored in a(n+1) and the maximum is stored
- in a(n+2).
- .PP
- The minimum and maximum values are NOT adjusted to pleasing
- values as they are with the CDC Calcomp routines.
- This is because it
- is difficult to define pleasing and the author prefers to see the
- maximum and minimum values on the axis.
- .PP
- If the integer flag is used with the axis subroutine, then the
- min and max values returned by scale should be
- adjusted so that (max - min) is divisable by (size / ticdis).
- SHAR_EOF
- cat << \SHAR_EOF > site.3g
- .TH SITE 3g "CRC Graphics Package"
- .SH NAME
- site - change default line printer site
- .SH SYNOPSIS
- .nf
- >From C:
- char *s;
-
- site(s);
-
- >From F77:
- character s()
-
- call site(s)
- .fi
- .SH DESCRIPTION
- This routine is used to change the default line printer site for
- .I gplp (1g).
- The parameter,
- .I s,
- is a null terminated string of the form: ``-XX'', where
- XX is the name of the printer.
- .SH REMARKS
- .I site
- must be called before the call to
- .I plots.
- .PP
- See
- .I opr(1)
- for more information about the line printer names.
- .PP
- The line printer must be a Printronix.
- SHAR_EOF
- cat << \SHAR_EOF > sline.3g
- .TH SLINE 3g "CRC Graphics Package"
- .SH NAME
- sline - draw a parametric line with on-center symbols
- .SH SYNOPSIS
- .nf
- >From C:
- float *x,*y,lx,ly;
- int n,j,sym;
-
- sline(x,y,n,lx,ly,j,sym);
-
- >From F77:
- real x(),y(),lx,ly
- integer n,j,sym
-
- call sline(x,y,n,lx,ly,j,sym)
- .fi
- .SH DESCRIPTION
- To draw a line of a parametric relationship (x[i],y[i]), i=0,2,...,n-1,
- with on-center symbols plotted every jth point.
- The
- .I i=n'th
- and
- .I i=n+1'th
- elements of each array should represent the minimum and maximum values
- of the points in that vector.
- The user can call the routine
- .I scale(3g)
- to automatically find the minimum and maximum values.
- The following parameters are used:
- .TP 10
- x,y
- Pointers to arrays containing the x and y coordinates of the
- parametric relationship (x[i],y[i]).
- .TP
- n
- The number of points in the parametric relationship.
- .TP
- lx
- The length (in plot units) that (xmax - xmin) is mapped to in page
- coordinates.
- .TP
- ly
- The length (in plot units) that (ymax - ymin) is mapped to in
- page coordinates.
- .TP
- j
- Plot the on-center symbol specified by `sym` at every |j|th point.
- if j is negative, no line is drawn between on-center symbols.
- .TP
- sym
- Specifies which on-center symbol is to be used.
- The following on-center symbols can be used.
- .ta 1i 2i
- .nf
- \fIsym on-center symbol\fR
-
- 0 no on-center symbol
- i $'i-1' i=1,2,...,10
- 11 $*
- 12 $+
- 13 $,
- .fi
- .SH REMARKS
- The Xi's and Yi's need not represent plot coordinates.
- .PP
- The minimun and maximum values for the arrays must be stored
- in the n+1st and n+2nd locations of the arrays respectively.
- .PP
- The point (x[i],y[i]) will be plotted at the page coordinates:
- .nf
-
- x = (x[i] - x[n]) / (x[n+1] - x[n]) * lx
- y = (y[i] - y[n]) / (y[n+1] - y[n]) * ly
-
- .fi
- relative to the current origin. Hence depending upon the location
- of the current origin, the adjusted minima need not actually be
- the minima of the data which is to be plotted so long as each point
- (x[i],y[i]) has page coordinates which lie within the plotting area.
- .PP
- An error will occur if xmin = xmax or ymin = ymax.
- SHAR_EOF
- cat << \SHAR_EOF > speed.3g
- .TH SPEED 3g "CRC Graphics Package"
- .SH NAME
- speed - change plotting speed of the HP plotter
- .SH SYNOPSIS
- .nf
- >From C:
- int vel
-
- speed(vel);
-
- >From F77:
- integer vel
-
- call speed(vel)
- .fi
- .SH DESCRIPTION
- The quality of a plot on an HP plotter is dependent on the
- quality of the pen and the speed at which it is moved
- across the paper.
- Generally as a pen ages and dries out a slower velocity can
- be used to maintain the quality of the plot.
- .PP
- The single parameter
- .I speed
- is the velocity of the pen in cm/sec.
- The valid range is [1,36].
- The default velocity is 36 cm/sec.
- .SH REMARKS
- Higher quality output is obtained at lower velocities.
- SHAR_EOF
- cat << \SHAR_EOF > strip7.1g
- .TH STRIP7 1g "CRC Graphics Package"
- .SH NAME
- strip7 - remove byte counts from f77 data files
- .SH SYNOPSIS
- strip7 [-r] file1 ...
- .SH DESCRIPTION
- Strip7 removes the byte counts that f77 puts
- into its binary output files.
- The 'stripped' files replace the original files.
- The '-r' option causes the 'stripped' files
- to be placed in a new files. The new file names are
- the original file names with a ".s7" suffix.
- .SH COMMENT
- Plots will be obtained even if 'strip7' is not run before
- calling
- .I qplot (1g)
- and
- .I plot3d(1g).
- The resulting graphics will be garbage
- because
- .I qplot
- and
- .I plot3d
- will interpret the byte count as a floating point number and
- it is usually much larger than any data in the user`s file..
- .SH FILES
- .TP 14
- strip7.tmp
- temp file
- .SH AUTHOR
- Carl Crawford
- .SH BUGS
- The maximum record length is only 4096 bytes.
- SHAR_EOF
- cat << \SHAR_EOF > symbol.3g
- .TH SYMBOL 3g "CRC Graphics Package"
- .SH NAME
- symbol - add alphanumeric labelling to a plot
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y,height,angle;
- char *string;
-
- symbol(x,y,height,string,angle);
-
- >From F77:
- real x,y,height,angle
- character string()
-
- call symbol(x,y,height,string,angle)
- .fi
- .SH DESCRIPTION
- The
- .I symbol
- routine adds alphanumeric notation to a plot.
- The location, size, angle and string to be plotted
- are specified with the following parameters.
- .TP 10
- x,y
- the coordinates of the point where the
- lower left corner of the first character is to be plotted.
- .TP
- height
- the height (in plot units) of the alphanumeric character
- string.
- .TP
- string
- a pointer to a zero terminated string.
- .TP
- angle
- the angle (in degrees) counterclockwise from the +x direction
- at which the string is to be plotted.
- .SH REMARKS
- The width of the characters is four-sevenths of height and they
- are spaced at intervals of six-sevenths of height. The space
- between characters is two-sevenths of height.
- .PP
- A second set of characters can be accessed by preceeding a valid
- character with a `$'. (A `$' can be obtained using `$$'.)
- The second
- font contains Greek letters and some special mathematical
- symbols.
- See
- .I fontinfo(8g)
- for more information about this alternate character
- font.
- SHAR_EOF
- cat << \SHAR_EOF > where.3g
- .TH WHERE 3g "CRC Graphics Package"
- .SH NAME
- where - return current pen position
- .SH SYNOPSIS
- .nf
- >From C:
- float x,y,sf;
-
- where(&x,&y,&sf);
-
- >From F77:
- real x,y,sf
-
- call where(x,y,sf)
- .fi
- .SH DESCRIPTION
- This routine aids in the optimization of plotting by returning the current
- pen coordinates and scale factor to the calling program.
- The current state is returned in the following variables:
- .TP 10
- x,y
- variables for the return of the current pen coordinates
- relative to the current origin.
- .TP
- sf
- variable for the return of the current scale factor.
- .SH REMARKS
- Values of
- .I x, y,
- and
- .I sf
- when this subroutine is called are
- disregarded.
- .PP
- Subroutine
- .I where
- can be used, for example, to determine which
- direction a line between the points (x1,y1) and (x2,y2) should
- be drawn in order to reduce pen movement when the pen position
- is unknown.
- SHAR_EOF
- chdir ..
- # End of shell archive
- exit 0
-
- --
-
- Rich $alz "Anger is an energy"
- Cronus Project, BBN Labs rsalz@bbn.com
- Moderator, comp.sources.unix sources@uunet.uu.net
-