Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH PLOT 6
2
.SH NAME
3
plot \- graphics interface
4
.SH DESCRIPTION
5
Files of this format are interpreted by
6
.IR  plot (1)
7
to draw graphics on the screen.
8
A
9
.I plot
10
file is a
11
.SM UTF
12
stream of
13
instruction lines.
14
Arguments are delimited by spaces, tabs, or commas.
15
Numbers may be floating point.
16
Punctuation marks (except 
17
.LR : )
18
,
19
spaces, and tabs at the beginning of lines are ignored.
20
Comments run from  
21
.L :
22
to newline.
23
Extra letters appended to a valid instruction are ignored.
24
Thus
25
.LR ...line ,
26
.LR line , and 
27
.L li
28
all mean the same thing.
29
Arguments are interpreted as follows:
30
.TP
31
1.
32
If an instruction requires no arguments, the rest of the line is ignored.
33
.TP
34
2.
35
If it requires a string argument, then all the line
36
after the first field separator is passed as argument.
37
Quote marks may be used to preserve leading blanks.
38
Strings may include newlines represented as
39
.LR \en .
40
.TP
41
3.
42
Between numeric arguments alphabetic characters and
43
punctuation marks are ignored.
44
Thus
45
.L
46
line from 5 6 to 7 8
47
draws a line from (5, 6) to (7, 8).
48
.TP
49
4.
50
Instructions with numeric arguments remain in effect until
51
a new instruction is read.
52
Such commands may spill over many lines. Thus
53
the following sequence will draw a polygon
54
with vertices
55
(4.5, 6.77), (5.8, 5.6), (7.8, 4.55), and (10.0, 3.6).
56
.IP
57
.EX
58
move 4.5 6.77
59
vec 5.8, 5.6 7.8
60
4.55 10.0, 3.6 4.5, 6.77
61
.EE
62
.PP
63
The instructions are executed in order.
64
The last designated point in a
65
.BR line ", " move ", " rmove ,
66
.BR vec ", " rvec ", " arc ,
67
or
68
.B point
69
command becomes the `current point'
70
.RI ( X,Y )
71
for the next command.
72
.SS "Open & Close"
73
.PD0
74
.TP 10
75
.BI o " string"
76
Open plotting device.
77
For 
78
.IR troff ,
79
.I string
80
specifies the size of the plot
81
(default is
82
.LR 6i ).
83
.TP 10
84
.B cl
85
Close plotting device.
86
.PD
87
.SS "Basic Plotting Commands"
88
.PD0
89
.TP 10
90
.B e
91
Start another frame of output.
92
.TP 10
93
.BI m " x y"
94
(move) Current point becomes
95
.I "x y."
96
.TP 10
97
.BI rm " dx dy"
98
Current point becomes
99
.I "X+dx Y+dy."
100
.TP 10
101
.BI poi " x y"
102
Plot the point
103
.I "x y"
104
and make it the current point.
105
.TP 10
106
.BI v " x y"
107
Draw a vector from the current point to
108
.I "x y."
109
.TP 10
110
.BI rv " dx dy"
111
Draw vector from current point to
112
.RI X + dx
113
.RI Y + dy
114
.TP 10
115
.BI li " x1 y1 x2 y2"
116
Draw a line from
117
.I "x1 y1"
118
to
119
.I "x2 y2."
120
Make the current point
121
.I "x2 y2."
122
.TP 10
123
.BI t " string"
124
Place the
125
.I string
126
so that its
127
first character is centered on the current point (default).
128
If
129
.I string
130
begins with
131
.L \eC
132
.RL ( \eR ),
133
it is centered (right-adjusted) on the current point.
134
A backslash at the beginning of the string may
135
be escaped with another backslash.
136
.TP 10
137
.BI a " x1 y1 x2 y2 xc yc r"
138
Draw a circular arc from
139
.I "x1 y1"
140
to
141
.I "x2 y2"
142
with center
143
.I "xc yc"
144
and radius
145
.IR r .
146
If the radius is positive, the arc is drawn counterclockwise;
147
negative, clockwise.
148
The starting point is exact but the ending point is approximate.
149
.TP 10
150
.BI ci " xc yc r"
151
Draw a circle centered at
152
.I "xc yc"
153
with radius
154
.IR r .
155
If the range and frame parameters do not specify a square,
156
the `circle' will be elliptical.
157
.TP 10
158
.BI di " xc yc r"
159
Draw a disc centered at
160
.I "xc yc"
161
with radius
162
.I r
163
using the filling color (see 
164
.B cfill
165
below).
166
.TP 10
167
.BI bo " x1 y1 x2 y2"
168
Draw a box with lower left corner at
169
.I "x1 y1"
170
and upper right corner at
171
.I "x2 y2."
172
.TP 10
173
.BI sb " x1 y1 x2 y2"
174
Draw a solid box with lower left corner at
175
.I "x1 y1"
176
and upper right corner at
177
.I "x2 y2"
178
using the filling color (see 
179
.B cfill
180
below).
181
.TP 10
182
.BI par " x1 y1 x2 y2 xg yg"
183
Draw a parabola from
184
.I "x1 y1"
185
to
186
.I "x2 y2"
187
`guided' by
188
.I "xg yg."
189
The parabola passes through the midpoint of the line joining
190
.I "xg yg"
191
with the midpoint of the line
192
joining
193
.I "x1 y1"
194
and
195
.I "x2 y2"
196
and is tangent to the lines from
197
.I "xg yg"
198
to the endpoints.
199
.TP 10
200
.BI "pol { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"
201
Draw polygons with vertices
202
.I "x1 y1 ... xn yn"
203
and
204
.I "X1 Y1 ... Xm Ym."
205
If only one polygon is specified, the inner brackets are
206
not needed.
207
.TP 10
208
.BI "fi { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"
209
Fill a polygon.
210
The arguments are the same as those for
211
.B pol
212
except that the first vertex is automatically repeated to
213
close each polygon.
214
The polygons do not have to be connected.
215
Enclosed polygons appear as holes.
216
.TP 10
217
.BI "sp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"
218
Draw a parabolic spline guided by
219
.I "x1 y1 ... xn yn"
220
with simple endpoints.
221
.TP 10
222
.BI "fsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"
223
Draw a parabolic spline guided by
224
.I "x1 y1 ... xn yn"
225
with double first endpoint.
226
.TP 10
227
.BI "lsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"
228
Draw a parabolic spline guided by
229
.I "x1 y1 ... xn yn"
230
with double last endpoint.
231
.TP 10
232
.BI "dsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"
233
Draw a parabolic spline guided by
234
.I "x1 y1 ... xn yn"
235
with double endpoints.
236
.TP 10
237
.BI "csp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fL} }\fI"
238
.TP 10
239
.BI in " filename"
240
(include) Take commands from
241
.IR filename .
242
.TP 10
243
.BI de " string " { " commands " }
244
Define
245
.I string
246
as
247
.IR commands .
248
.TP 10
249
.BI ca " string scale"
250
Invoke commands defined as
251
.I string
252
applying
253
.I scale
254
to all coordinates.
255
.PD
256
.SS "Commands Controlling the Environment"
257
.PD0
258
.TP 10
259
.BI co " string"
260
Use color given by first character of
261
.IR string ,
262
one of
263
.BR red ,
264
.BR yellow ,
265
.BR green ,
266
.BR blue ,
267
.BR cyan ,
268
.BR magenta ,
269
.BR white ,
270
and
271
.BR kblack .
272
.TP 10
273
.BI pe " string"
274
Use
275
.I string
276
as the style for drawing lines.
277
The available pen styles are:
278
.BR solid ,
279
.BR  dott [ed],
280
.BR short ,
281
.BR long ,
282
.BR dotd [ashed] ,
283
.BR cdash ,
284
.BR ddash
285
.TP 10
286
.BI cf " string"
287
Color for filling (see
288
.BR co ,
289
above).
290
.TP 10
291
.BI ra " x1 y1 x2 y2"
292
The data will fall between
293
.I "x1 y1"
294
and
295
.I "x2 y2."
296
The plot will be magnified or reduced to fit
297
the device as closely as possible.
298
.IP
299
Range settings that exactly fill the plotting area
300
with unity scaling appear below for
301
devices supported by the filters of
302
.IR  plot (1).
303
The upper limit is just outside the plotting area.
304
In every case the plotting area is taken to be square;
305
points outside may be displayable on
306
devices with nonsquare faces.
307
.TP 10
308
.BI fr " px1 py1 px2 py2"
309
Plot the data in the fraction of the display
310
specified by
311
.I "px1 py1"
312
for lower left corner
313
and
314
.I "px2 py2"
315
for upper right corner.
316
Thus  
317
.L frame .5 0 1. .5
318
plots in the lower right
319
quadrant of the display;
320
.L frame 0. 1. 1. 0.
321
uses the whole display but
322
inverts the
323
.I y
324
coordinates.
325
.TP 10
326
.B sa
327
Save the current environment, and move to a new one.
328
The new environment inherits the old one.
329
There are 7 levels.
330
.TP 10
331
.B re
332
Restore previous environment.
333
.PD
334
.SH "SEE ALSO"
335
.IR plot (1), 
336
.IR graph (1)