1 |
/* RCSid: $Id$ */ |
2 |
/* |
3 |
* mgraph.h - header file for graphing routines. |
4 |
* |
5 |
* 6/23/86 |
6 |
* |
7 |
* Greg Ward Larson |
8 |
*/ |
9 |
|
10 |
#define PI 3.14159265358979323846 |
11 |
#define FHUGE 1e20 |
12 |
#define FTINY 1e-7 |
13 |
/* text density */ |
14 |
#define CPI 10 |
15 |
#define CWID (2048/CPI) |
16 |
/* character aspect ratio */ |
17 |
#define ASPECT 1.67 |
18 |
/* fraction of period for polar arc */ |
19 |
#define PL_F 0.02 |
20 |
/* minimum # of axis divisions */ |
21 |
#define MINDIVS 4 |
22 |
/* coordinate axis box */ |
23 |
#define AX_L 2048 |
24 |
#define AX_R 12288 |
25 |
#define AX_D 2048 |
26 |
#define AX_U 12288 |
27 |
/* polar plot center and radius */ |
28 |
#define PL_X 6912 |
29 |
#define PL_Y 7168 |
30 |
#define PL_R 5120 |
31 |
/* axis tick length */ |
32 |
#define TLEN 200 |
33 |
/* x numbering offsets */ |
34 |
#define XN_X 0 |
35 |
#define XN_Y (AX_D-TLEN-300) |
36 |
#define XN_S 1000 |
37 |
/* y numbering offsets */ |
38 |
#define YN_X (AX_L-TLEN-200) |
39 |
#define YN_Y 64 |
40 |
#define YN_S 500 |
41 |
/* polar numbering offsets */ |
42 |
#define TN_X PL_X |
43 |
#define TN_Y (PL_Y+150) |
44 |
#define TN_R (PL_R+TLEN+250) |
45 |
#define RN_X PL_X |
46 |
#define RN_Y (PL_Y-TLEN/2-200) |
47 |
#define RN_S XN_S |
48 |
/* title box */ |
49 |
#define TI_L 0 |
50 |
#define TI_R 16383 |
51 |
#define TI_D 14500 |
52 |
#define TI_U 15300 |
53 |
/* subtitle box */ |
54 |
#define ST_L 0 |
55 |
#define ST_R 16383 |
56 |
#define ST_D 13675 |
57 |
#define ST_U 14170 |
58 |
/* x label box */ |
59 |
#define XL_L 2048 |
60 |
#define XL_R 9850 |
61 |
#define XL_D 500 |
62 |
#define XL_U 1000 |
63 |
/* x mapping box */ |
64 |
#define XM_L 10000 |
65 |
#define XM_R 12288 |
66 |
#define XM_D 670 |
67 |
#define XM_U 1000 |
68 |
/* y label box */ |
69 |
#define YL_L 0 |
70 |
#define YL_R 500 |
71 |
#define YL_D 2048 |
72 |
#define YL_U 9850 |
73 |
/* y mapping box */ |
74 |
#define YM_L 170 |
75 |
#define YM_R 500 |
76 |
#define YM_D 10000 |
77 |
#define YM_U 12288 |
78 |
/* legend box */ |
79 |
#define LE_L 13100 |
80 |
#define LE_R 16383 |
81 |
#define LE_D 4000 |
82 |
#define LE_U 10000 |
83 |
/* legend title */ |
84 |
#define LT_X LE_L |
85 |
#define LT_Y (LE_U+800) |
86 |
/* parameter defaults */ |
87 |
#define DEFFTHICK 3 /* frame thickness */ |
88 |
#define DEFTSTYLE 1 /* tick mark style */ |
89 |
#define DEFOTHICK 0 /* origin thickness */ |
90 |
#define DEFGRID 0 /* default grid */ |
91 |
#define DEFSYMSIZE 100 /* symbol size */ |
92 |
#define DEFLINTYPE 1 /* line type */ |
93 |
#define DEFTHICK 2 /* line thickness */ |
94 |
#define DEFCOLOR 1 /* color */ |
95 |
#define DEFPERIOD 0.0 /* period for polar plot */ |
96 |
#define DEFPLSTEP (1./12.) /* default angular step */ |
97 |
|
98 |
/* |
99 |
* Bounds are used to hold the axis specifications. |
100 |
*/ |
101 |
|
102 |
typedef struct { |
103 |
double min, max, step; |
104 |
} BOUNDS; |