Blob


1 /* Plotting functions for v8 and v9 systems */
2 /* This file is an alternative to plot.h */
4 /* open the plotting output */
5 #define openpl() print("o\n")
7 /* close the plotting output */
8 #define closepl() print("cl\n")
10 /* make sure the page or screen is clear */
11 #define erase() print("e\n")
13 /* plot a point at _x,_y, which becomes current */
14 #define point(_x,_y) print("poi %d %d\n", _x,_y)
16 /* coordinates to be assigned to lower left and upper right
17 corners of (square) plotting area */
18 #define range(_x,_y,_X,_Y) print("ra %d %d %d %d\n", _x,_y,_X,_Y)
20 /* place text, first letter at current point, which does not change */
21 #define text(_s) {if(*(_s) == ' ')print("t \"%s\"\n",_s); else print("t %s\n", _s); }
23 /* draw line from current point to _x,_y, which becomes current */
24 #define vec(_x,_y) print("v %d %d\n", _x,_y)
26 /* _x,_y becomes current point */
27 #define move(_x, _y) print("m %d %d\n", _x, _y)
29 /* specify style for drawing lines */
31 #define SOLID "solid"
32 #define DOTTED "dotted"
33 #define DASHED "dashed"
34 #define DOTDASH "dotdash"
36 #define pen(_s) print("pe %s\n", _s)
38 #define BLACK "z"
39 #define RED "r"
40 #define YELLOW "y"
41 #define GREEN "g"
42 #define BLUE "b"
43 #define CYAN "c"
44 #define MAGENTA "m"
45 #define WHITE "w"
47 #define colorcode(_s) ((strcmp(_s,"black")==0)?BLACK:_s)
49 #define colorx(_s) print("co %s\n", _s); /* funny name is all ken's fault */
51 #define comment(s,f)