postmd(1M) (Line Printer PostScript Utilities) postmd(1M)
NAME
postmd - matrix display program for PostScript printers
SYNOPSIS
/usr/lib/lp/postscript/postmd [options] [files]
DESCRIPTION
postmd reads a series of floating point numbers from files, translates
them into a PostScript gray scale image, and writes the results to
standard output. In a typical application the numbers might be the
elements of a large matrix, written in row major order, while the
printed image could help locate patterns in the matrix. If no files
are specified, or if - is one of the input files, standard input is
read.
OPTIONS
-bnum Packs the bitmap in the output file using num byte patterns. A
value of 0 turns off all packing of the output file. By default
num is 6.
-cnum Prints num copies of each page. By default only one copy is
printed.
-ddimenSets the default matrix dimensions for all input files to
dimen. The dimen string can be given as rows or rowsxcolumns.
If columns is omitted it will be set to rows. By default postmd
assumes each matrix is square and sets the number of rows and
columns to the square root of the number of elements in each
input file.
-glist list is a comma or space separated string of integers, each
lying between 0 and 255 inclusive, that assigns PostScript gray
scales to the regions of the real line selected by the -i
option. 255 corresponds to white and 0 to black. postmd assigns
a default gray scale that omits white (i.e. 255) and gets
darker as the regions move from left to right along the real
line.
-ilist list is a comma or space separated string of N floating point
numbers that partition the real line into 2N+1 regions. The
list must be given in increasing numerical order. The parti-
tions are used to map floating point numbers read from the
input files into gray scale integers that are assigned automat-
ically by postmd or arbitrarily selected using the -g option.
The default interval list is "-1,0,1" which partions the real
line into 7 regions.
-mnum Magnifies each logical page by the factor num. Pages are scaled
uniformly about the origin, which by default is located at the
center of each page. The default magnification is 1.0.
-nnum Prints num logical pages on each piece of paper, where num can
Page 1 Reliant UNIX 5.44 Printed 11/98
postmd(1M) (Line Printer PostScript Utilities) postmd(1M)
be any positive integer. By default num is set to 1.
-olist Prints pages whose numbers are given in the comma-separated
list. The list contains single numbers N and ranges N1 - N2. A
missing N1 means the lowest numbered page, a missing N2 means
the highest.
-pmode Prints files in either portrait or landscape mode. Only the
first character of mode (p or l) is significant. The default
mode is portrait.
-wwindow
window is a comma or space separated list of four positive
integers that select the upper left and lower right corners of
a submatrix from each of the input files. Row and column
indices start at 1 in the upper left corner and the numbers in
the input files are assumed to be written in row major order.
By default the entire matrix is displayed.
-xnum Translates the origin num inches along the positive x axis. The
default coordinate system has the origin fixed at the center of
the page, with positive x to the right and positive y up the
page. Positive num moves everything right. The default offset
is 0 inches.
-ynum Translates the origin num inches along the positive y axis.
Positive num moves everything up the page. The default offset
is 0 inches.
-Afile Appends a simple accounting record to file after all the input
files have been successfully translated. By default no account-
ing data is produced.
-Lfile Uses file as the PostScript prologue, which by default is
/usr/lib/lp/postscript/postmd.ps.
In addition, three options allow the insertion of arbitrary PostScript
at controlled points in the translation process:
-Cfile Copies file to the output file. file follows the prologue but
precedes any job initialization commands. file becomes part of
the job's global environment and must contain legitimate
PostScript commands.
-Pstring
Adds string to the output file. string follows the prologue but
precedes any job initialization commands. string becomes part
of the job's global environment and must be legitimate
PostScript.
-Raction
Requests special action (e.g. manual feed) on a per page or
Page 2 Reliant UNIX 5.44 Printed 11/98
postmd(1M) (Line Printer PostScript Utilities) postmd(1M)
global basis. The action string can be given as request,
request:page, or request:page:file. If page is omitted or given
as 0 the request applies to all pages. If file is omitted the
request lookup is done in /usr/lib/lp/postscript/ps.requests.
The collection of recognized requests can be modified or
extended by changing /usr/lib/lp/postscript/ps.requests. Multi-
ple occurrences of the -R option behave as expected.
Only one matrix is displayed on each logical page, and each of the
input files must contain complete descriptions of exactly one matrix.
Matrix elements are floating point numbers arranged in row major order
in each input file. White space, including newlines, is not used to
determine matrix dimensions. By default postmd assumes each matrix is
square and sets the number of rows and columns to the square root of
the number of elements in the input file. Supplying default dimensions
on the command line using the -d option overrides this default
behavior, and in that case the dimensions apply to all input files.
An optional header can be supplied with each input file and is used to
set the matrix dimensions, the partition of the real line, the gray
scale map, and a window into the matrix. The header consists of
keyword/value pairs, each on a separate line. It begins on the first
line of each input file and ends with the first unrecognized string,
which should be the first matrix element. Values set in the header
take precedence, but only apply to the current input file. Recognized
header keywords are dimension, interval, grayscale, and window. The
syntax of the value string that follows each keyword parallels what's
accepted by the -d, -i, -g, and -w options.
EXAMPLES
For example, suppose file initially contains the 1000 numbers in a
20x50 matrix. Then the command line,
postmd -d20x50 -i"-100 100" -g0,128,254,128,0 file
and prepending the header,
dimension 20x50
interval -100.0 .100e+3
grayscale 0 128 254 128 0
to file and typing the command line,
postmd file
produce exactly the same output. The interval list partitions the real
line into five regions and the gray scale list maps numbers less than
-100 or greater than 100 into 0 (i.e. black), numbers equal to -100 or
100 into 128 (i.e. 50 percent black), and numbers between -100 and 100
into 254 (i.e. almost white).
Page 3 Reliant UNIX 5.44 Printed 11/98
postmd(1M) (Line Printer PostScript Utilities) postmd(1M)
WARNINGS
The largest matrix that can be adequately displayed is a function of
the interval and gray scale lists, the printer resolution, and the
paper size. A 600x600 matrix is an optimistic upper bound for a two
element interval list (i.e. five regions) using 8.5x11 inch paper on a
300 dpi printer.
Using white (i.e. 255) in a gray scale list is not recommended and
won't show up in the legend and bar graph that postmd displays below
each image.
DIAGNOSTICS
0 exit status is returned if files were successfully processed.
FILES
/usr/lib/lp/postscript/postmd.ps
/usr/lib/lp/postscript/forms.ps
/usr/lib/lp/postscript/ps.requests
SEE ALSO
dpost(1M), postdaisy(1M), postdmd(1M), postio(1M), postprint(1M),
postreverse(1M), posttek(1M).
Page 4 Reliant UNIX 5.44 Printed 11/98