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