1postmd(1)                        User Commands                       postmd(1)
2
3
4

NAME

6       postmd - matrix display program for PostScript printers
7

SYNOPSIS

9       postmd [-b num] [-c num] [-d dimen] [-g list] [-i list]
10            [-m num] [-n num] [-o list] [-p mode] [-w  window]
11            [-x num] [-y num] [file]...
12
13
14       /usr/lib/lp/postscript/postmd
15
16

DESCRIPTION

18       The  postmd filter reads a series of floating point numbers from files,
19       translates them into a PostScript gray  scale  image,  and  writes  the
20       results  on  the standard output. In a typical application, the numbers
21       might be the elements of a large matrix, written in  row  major  order,
22       while the printed image could help locate patterns in the matrix. If no
23       files are specified, or if - is one of the input  files,  the  standard
24       input is read.
25

OPTIONS

27       The following options are supported:
28
29       -b num       Packs  the  bitmap  in the output file using num byte pat‐
30                    terns. A value of 0 turns off all packing  of  the  output
31                    file. By default, num is  6.
32
33
34       -c num       Prints  num copies of each page. By default, only one copy
35                    is printed.
36
37
38       -d dimen     Sets the default matrix dimensions for all input files  to
39                    dimen. The dimen string can be given as rows or rowsx col‐
40                    umns. If columns is omitted it will be  set  to  rows.  By
41                    default, postmd assumes each matrix is square and sets the
42                    number of rows and columns to the square root of the  num‐
43                    ber of elements in each input file.
44
45
46       -g list      list  is  a  comma- or space-separated string of integers,
47                    each lying between 0 and 255 inclusive, that assigns Post‐
48                    Script  gray  scales  to  the  regions  of  the  real line
49                    selected by the -i option. 255 corresponds to  white,  and
50                    0,  to  black.  The  postmd  filter assigns a default gray
51                    scale that omits white (that is, 255)  and gets darker  as
52                    the regions move from left to right along the real line.
53
54
55       -i list      list  is a comma-, space-, or slash(/)-separated string of
56                    N floating point numbers that partition the real line into
57                    2N+1 regions. The list must be given in increasing numeri‐
58                    cal order. The partitions are used  to map floating  point
59                    numbers read from the input files into gray scale integers
60                    that are either assigned automatically by postmd or  arbi‐
61                    trarily selected using the -g option. The default interval
62                    list is -1,0,1, which partions the real  line  into  seven
63                    regions.
64
65
66       -m num       Magnifies  each  logical page by the factor num. Pages are
67                    scaled uniformly about the origin which,  by  default,  is
68                    located at the center of each page. The default magnifica‐
69                    tion is 1.0.
70
71
72       -n num       Prints num logical pages on each piece of paper, where num
73                    can be any positive integer. By default, num is set to  1.
74
75
76       -o list      Prints  pages  whose  numbers are given in the comma sepa‐
77                    rated list. The list contains single numbers N and  ranges
78                    N1  -  N2.  A missing N1 means the lowest numbered page, a
79                    missing N2 means the highest. The page range is an expres‐
80                    sion  of  logical  pages  rather  than  physical sheets of
81                    paper. For example, if you are printing two logical  pages
82                    to  a  sheet,  and  you  specified  a range of 4, then two
83                    sheets of paper would print, containing four page layouts.
84                    If  you specified a page range of 3-4, when requesting two
85                    logical pages to a sheet; then only page 3 and page 4 lay‐
86                    outs  would  print,  and they would appear on one physical
87                    sheet of paper.
88
89
90       -p mode      Prints files in either portrait or  landscape  mode.  Only
91                    the  first  character  of mode is significant. The default
92                    mode is portrait.
93
94
95       -w window    window is a comma- or space-separated list of  four  posi‐
96                    tive  integers  that select the upper left and lower right
97                    corners of a submatrix from each of the input  files.  Row
98                    and column indices start at 1 in the upper left corner and
99                    the numbers in the input files are assumed to  be  written
100                    in  row major order. By default, the entire matrix is dis‐
101                    played.
102
103
104       -x num       Translates the origin num  inches  along  the  positive  x
105                    axis.  The  default coordinate system has the origin fixed
106                    at the center of the page, with positive x  to  the  right
107                    and  positive y up the page. Positive num moves everything
108                    right. The default offset is  0 inches.
109
110
111       -y  num      Translates the origin num  inches  along  the  positive  y
112                    axis.  Positive  num  moves  everything  up  the page. The
113                    default offset is  0.
114
115
116
117       Only one matrix is displayed on each logical  page,  and  each  of  the
118       input  files  must contain complete descriptions of exactly one matrix.
119       Matrix elements are floating point numbers  arranged in row major order
120       in  each  input  file. White space, including newlines,  is not used to
121       determine matrix dimensions. By default, postmd assumes each matrix  is
122       square  and  sets  the number of rows and columns to the square root of
123       the number of elements in the input file. Supplying default  dimensions
124       on the command line with the -d option overrides this default behavior,
125       and in that case the dimensions apply to all input files.
126
127
128       An optional header can be supplied with each input file and is used  to
129       set  the  matrix dimensions,  the partition of the real line,  the gray
130       scale map, and a window into the matrix. The header  consists  of  key‐
131       word/value  pairs, each on a separate line. It begins on the first line
132       of each input file and ends with the first unrecognized  string,  which
133       should  be  the  first  matrix  element.  Values set in the header take
134       precedence,  but apply only  to  the  current  input  file.  Recognized
135       header  keywords  are  dimension,  interval, grayscale, and window. The
136       syntax of the value string that follows each keyword  parallels what is
137       accepted by the -d, -i, -g, and -w options.
138

EXAMPLES

140       Example 1 Generating an interval list
141
142
143       For  example,  suppose  file  initially  contains the 1000 numbers in a
144       20x50 matrix. Then you can produce exactly the same output by  complet‐
145       ing three steps.
146
147
148           1.     First, issue the following command line:
149
150                    example% postmd -d20x50 -i"-100 100" -g0,128,254,128,0 file
151
152
153
154           2.     Second, prepend the following header to file:
155
156                    example% postmd -d20x50 -i"−100 100" -g0,128,254,128,0 file
157
158
159
160           3.     Third, issue the following command line:
161
162                    example% postmd file
163
164
165
166
167       The  interval  list  partitions the real line into five regions and the
168       gray scale list maps numbers less than -100 or greater than 100 into  0
169       (that  is,  black),  numbers equal to -100 or 100 into 128 (that is, 50
170       percent black), and numbers between -100 and 100  into  254  (that  is,
171       almost white).
172
173

FILES

175       /usr/lib/lp/postscript/forms.ps
176
177
178
179
180       /usr/lib/lp/postscript/ps.requests
181
182
183
184

EXIT STATUS

186       The following exit values are returned:
187
188       0           Successful completion.
189
190
191       non-zero    An error occurred.
192
193

ATTRIBUTES

195       See attributes(5) for descriptions of the following attributes:
196
197
198
199
200       ┌─────────────────────────────┬─────────────────────────────┐
201       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
202       ├─────────────────────────────┼─────────────────────────────┤
203       │Availability                 │SUNWpsf                      │
204       └─────────────────────────────┴─────────────────────────────┘
205

SEE ALSO

207       dpost(1),  postdaisy(1),  postdmd(1),  postio(1), postprint(1), postre‐
208       verse(1), posttek(1), attributes(5)
209

NOTES

211       The largest matrix that can be adequately displayed is  a  function  of
212       the  interval  and  gray  scale  lists, the printer resolution, and the
213       paper size. A 600 by 600 matrix is an optimistic upper bound for a  two
214       element  interval  list  (that  is,  five regions) using 8.5 by 11 inch
215       paper on a 300 dpi printer.
216
217
218       Using white (that is, 255) in a gray scale list  is not recommended and
219       won't  show  up in  the legend and bar graph that postmd displays below
220       each image.
221
222
223
224SunOS 5.11                        9 Sep 1996                         postmd(1)
Impressum