|
|
1.1 root 1: .TH PLOT 5
2: .CT 1 graphics
3: .SH NAME
4: plot \- graphics interface
5: .SH DESCRIPTION
6: Files of this format are produced by routines
7: described in
8: .IR plot (3),
9: and are interpreted for various devices
10: by commands described in
11: .IR plot (1).
12: A graphics file is an ASCII 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: Each of the following descriptions
73: corresponds to a routine in
74: .IR plot (3).
75: .SS "Open & Close"
76: .PD0
77: .TP 10
78: .BI o " string"
79: Open plotting device.
80: For
81: .I troff,
82: .I string
83: specifies the size of the plot
84: (default is
85: .LR 6i. )
86: .TP 10
87: .B cl
88: Close plotting device.
89: .PD
90: .SS "Basic Plotting Commands"
91: .PD0
92: .TP 10
93: .B e
94: Start another frame of output
95: or erase the screen on CRT terminals without scroll.
96: .TP 10
97: .BI m " x y"
98: (move) Current point becomes
99: .I "x y."
100: .TP 10
101: .BI rm " dx dy"
102: Current point becomes
103: .I "X+dx Y+dy."
104: .TP 10
105: .BI poi " x y"
106: Plot the point
107: .I "x y"
108: and make it the current point.
109: .TP 10
110: .BI v " x y"
111: Draw a vector from the current point to
112: .I "x y."
113: .TP 10
114: .BI rv " dx dy"
115: Draw vector from current point to
116: .RI X + dx
117: .RI Y + dy
118: .TP 10
119: .BI li " x1 y1 x2 y2"
120: Draw a line from
121: .I "x1 y1"
122: to
123: .I "x2 y2."
124: Make the current point
125: .I "x2 y2."
126: .TP 10
127: .BI t " string"
128: Place the
129: .I string
130: so that its
131: first character is centered on the current point (default).
132: If
133: .I string
134: begins with
135: .L \eC
136: .RL ( \eR ),
137: it is centered (right-adjusted) on the current point.
138: A backslash at the beginning of the string may
139: be escaped with another backslash.
140: .TP 10
141: .BI a " x1 y1 x2 y2 xc yc r"
142: Draw a circular arc from
143: .I "x1 y1"
144: to
145: .I "x2 y2"
146: with center
147: .I "xc yc"
148: and radius
149: .I r.
150: If the radius is positive, the arc is drawn counterclockwise;
151: negative, clockwise.
152: The starting point is exact but the ending point is approximate.
153: .TP 10
154: .BI ci " xc yc r"
155: Draw a circle centered at
156: .I "xc yc"
157: with radius
158: .I r.
159: If the range and frame parameters do not specify a square,
160: the `circle' will be elliptical.
161: .TP 10
162: .BI di " xc yc r"
163: Draw a disc centered at
164: .I "xc yc"
165: with radius
166: .I r
167: using the filling color (see
168: .B cfill
169: below).
170: Only works on the 5620; on other devices
171: is the same as
172: .BR circle .
173: .TP 10
174: .BI bo " x1 y1 x2 y2"
175: Draw a box with lower left corner at
176: .I "x1 y1"
177: and upper right corner at
178: .I "x2 y2."
179: .TP 10
180: .BI sb " x1 y1 x2 y2"
181: Draw a solid box with lower left corner at
182: .I "x1 y1"
183: and upper right corner at
184: .I "x2 y2"
185: using the filling color (see
186: .B cfill
187: below).
188: .TP 10
189: .BI par " x1 y1 x2 y2 xg yg"
190: Draw a parabola from
191: .I "x1 y1"
192: to
193: .I "x2 y2"
194: `guided' by
195: .I "xg yg."
196: The parabola passes through the midpoint of the line joining
197: .I "xg yg"
198: with the midpoint of the line
199: joining
200: .I "x1 y1"
201: and
202: .I "x2 y2"
203: and is tangent to the lines from
204: .I "xg yg"
205: to the endpoints.
206: .TP 10
207: .BI "pol { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"
208: Draw polygons with vertices
209: .I "x1 y1 ... xn yn"
210: and
211: .I "X1 Y1 ... Xm Ym."
212: If only one polygon is specified, the inner brackets are
213: not needed.
214: .TP 10
215: .BI "fi { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\fP} }\fI"
216: Fill a polygon.
217: The arguments are the same as those for
218: .B pol
219: except that the first vertex is automatically repeated to
220: close each polygon.
221: The polygons do not have to be connected.
222: Enclosed polygons appear as holes.
223: .TP 10
224: .BI "sp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\f5} }\fI"
225: Draw a parabolic spline guided by
226: .I "x1 y1 ... xn yn"
227: with simple endpoints.
228: .TP 10
229: .BI "fsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\f5} }\fI"
230: Draw a parabolic spline guided by
231: .I "x1 y1 ... xn yn"
232: with double first endpoint.
233: .TP 10
234: .BI "lsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\f5} }\fI"
235: Draw a parabolic spline guided by
236: .I "x1 y1 ... xn yn"
237: with double last endpoint.
238: .TP 10
239: .BI "dsp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\f5} }\fI"
240: Draw a parabolic spline guided by
241: .I "x1 y1 ... xn yn"
242: with double endpoints.
243: .TP 10
244: .BI "csp { {" "x1 y1 ... xn yn" } " ... " { "X1 Y1 ... Xm Ym\f5} }\fI"
245: .TP 10
246: .BI in " filename"
247: (include) Take commands from
248: .I filename.
249: .TP 10
250: .BI de " string " { " commands " }
251: Define
252: .I string
253: as
254: .I commands.
255: .TP 10
256: .BI ca " string scale"
257: Invoke commands defined as
258: .I string
259: applying
260: .I scale
261: to all coordinates.
262: .PD
263: .SS "Commands Controlling the Environment"
264: .PD0
265: .TP 10
266: .BI co " string"
267: Draw lines with color
268: .I string.
269: Available colors depend on the device.
270: .I String
271: may contain definitions for several devices separated by
272: .LR / .
273: Colors possible for the various devices are:
274: .RS
275: .IP pen
276: .BR black ,
277: .BR red ,
278: .BR green ,
279: .BR blue ,
280: .BR Tblack ,
281: .BR Tred ,
282: .BR Tgreen ,
283: .B Tblue
284: (assumes default carousel,
285: .BR T =thick)
286: .br
287: .BR 1 - 8
288: (pen number)
289: .br
290: .BI S number
291: character size as % of plotting area
292: .IP troff
293: .BI F font
294: .br
295: .BI P "point size"
296: .IP 2621
297: .BI H character
298: for plotting
299: .RE
300: .PD
301: .TP 10
302: .BI pe " string"
303: Use
304: .I string
305: as the style for drawing lines.
306: Not all pen styles are implemented for all devices.
307: .I String
308: may contain definitions for several devices separated by
309: .LR / .
310: The available pen styles are:
311: .RS
312: .IP pen
313: .BR solid ,
314: .BR dott [ed],
315: .BR short ,
316: .BR long ,
317: .BR dotd [ashed] ,
318: .BR cdash ,
319: .BR ddash
320: .PD0
321: .IP 4014
322: solid ,
323: .BR dott [ed] ,
324: .BR short ,
325: .BR long ,
326: .BR dotd [ashed] ,
327: .BR ddash
328: .IP troff
329: .BR solid ,
330: .BR dash
331: only straight lines will be dashed
332: .IP 5620
333: .BI B number
334: line thickness
335: .IP 2621
336: .BI H character
337: for plotting
338: .fi
339: .PD
340: .RE
341: .TP 10
342: .BI cf " string"
343: Color for filling;
344: may contain the definitions for several devices.
345: separated by
346: .LR / .
347: The following colors are available on the specified devices:
348: .RS
349: .IP pen
350: .BR black ,
351: .BR red ,
352: .BR green ,
353: .BR blue ,
354: .BR Tblack ,
355: .BR Tred ,
356: .BR Tgreen ,
357: .BR Tblue
358: .br
359: .BR 1 - 8
360: pen number
361: .PD0
362: .IP 5620
363: .BI B texture
364: string with octal numbers for texture; see
365: .IR types (9.5).
366: The 16 words of texture should be followed by one word for the mode used by
367: .IR texture() ;
368: see
369: .IR bitblt (9.3).
370: .IP 2621
371: .BI H character
372: for filling
373: .IP All devices
374: .BI /A degrees
375: slant of shading lines
376: .br
377: .BI /G number
378: gap between shading lines (in user units)
379: .RE
380: .PD
381: .TP 10
382: .BI ra " x1 y1 x2 y2"
383: The data will fall between
384: .I "x1 y1"
385: and
386: .I "x2 y2."
387: The plot will be magnified or reduced to fit
388: the device as closely as possible.
389: .IP
390: Range settings that exactly fill the plotting area
391: with unity scaling appear below for
392: devices supported by the filters of
393: .IR plot (1).
394: The upper limit is just outside the plotting area.
395: In every case the plotting area is taken to be square;
396: points outside may be displayable on
397: devices with nonsquare faces.
398: .RS
399: .TP 10n
400: 4014
401: .L range 0. 0. 3120. 3120.
402: .br
403: .ns
404: .TP 10n
405: troff
406: .L range 0. 0. 6144. 6144.
407: .br
408: .ns
409: .TP 10n
410: 2621
411: .L range 0. 0. 22. 22.
412: .br
413: .ns
414: .TP 10n
415: 5620
416: range dependent on layer size
417: .br
418: .ns
419: .TP 10n
420: pen
421: range dependent on paper size
422: .RE
423: .TP 10
424: .BI fr " px1 py1 px2 py2"
425: Plot the data in the fraction of the display
426: specified by
427: .I "px1 py1"
428: for lower left corner
429: and
430: .I "px2 py2"
431: for upper right corner.
432: Thus
433: .L frame .5 0 1. .5
434: plots in the lower right
435: quadrant of the display;
436: .L frame 0. 1. 1. 0.
437: uses the whole display but
438: inverts the
439: .I y
440: coordinates.
441: .TP 10
442: .B sa
443: Save the current environment, and move to a new one.
444: The new environment inherits the old one.
445: There are 7 levels.
446: .TP 10
447: .B re
448: Restore previous environment.
449: .PD
450: .SH "SEE ALSO"
451: .IR plot (1),
452: .IR plot (3),
453: .IR graph (1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.