| 1 | schorsch | 1.4 | /* RCSid: $Id: tgraph.h,v 1.3 2003/07/14 22:24:00 schorsch Exp $ */ | 
| 2 | greg | 1.1 |  | 
| 3 | schorsch | 1.3 | #ifndef _RAD_TGRAPH_H_ | 
| 4 |  |  | #define _RAD_TGRAPH_H_ | 
| 5 |  |  |  | 
| 6 |  |  | #include  <stdlib.h> | 
| 7 | greg | 1.1 | #include  <math.h> | 
| 8 |  |  |  | 
| 9 | schorsch | 1.2 | #include  "meta.h" | 
| 10 | greg | 1.1 |  | 
| 11 | schorsch | 1.3 | #ifdef __cplusplus | 
| 12 |  |  | extern "C" { | 
| 13 |  |  | #endif | 
| 14 |  |  |  | 
| 15 | greg | 1.1 | #define  MINDIVS  4             /* Minimum number of divisions for axis */ | 
| 16 |  |  |  | 
| 17 |  |  | #define  FTINY  1e-10           /* tiny float */ | 
| 18 |  |  |  | 
| 19 |  |  | #define  FHUGE  1e10            /* large float */ | 
| 20 |  |  |  | 
| 21 |  |  | #define  PI  3.14159265358979323846 | 
| 22 |  |  |  | 
| 23 |  |  | #define  XBEG  2048             /* starting x coordinate */ | 
| 24 |  |  |  | 
| 25 |  |  | #define  XSIZ  10240            /* x axis coordinate size */ | 
| 26 |  |  |  | 
| 27 |  |  | #define  YBEG  2048             /* starting y coordinate */ | 
| 28 |  |  |  | 
| 29 |  |  | #define  YSIZ  10240            /* y axis coordinate size */ | 
| 30 |  |  |  | 
| 31 |  |  | #define  XCONV(x)  ((int)((x-xmin)*XSIZ/xsize+XBEG)) | 
| 32 |  |  |  | 
| 33 |  |  | #define  YCONV(y)  ((int)((y-ymin)*YSIZ/ysize+YBEG)) | 
| 34 |  |  |  | 
| 35 |  |  | #define  TSIZ  200              /* tick size */ | 
| 36 |  |  |  | 
| 37 |  |  | #define  SYMRAD  100            /* default symbol radius */ | 
| 38 |  |  |  | 
| 39 |  |  | #define  XTICS  1               /* flags for making axes */ | 
| 40 |  |  | #define  YTICS  2 | 
| 41 |  |  | #define  XNUMS  4 | 
| 42 |  |  | #define  YNUMS  8 | 
| 43 |  |  | #define  XGRID  16 | 
| 44 |  |  | #define  YGRID  32 | 
| 45 |  |  | #define  ORIGIN  64 | 
| 46 |  |  | #define  BOX  128 | 
| 47 |  |  |  | 
| 48 |  |  | #define  RADIANS  1             /* flags for polar coordinates */ | 
| 49 |  |  | #define  DEGREES  2 | 
| 50 |  |  |  | 
| 51 |  |  | #define  NCUR  16               /* number of supported curve types */ | 
| 52 |  |  |  | 
| 53 |  |  |  | 
| 54 |  |  |  | 
| 55 |  |  | extern short  usecurve[];               /* booleans for curve usage */ | 
| 56 |  |  |  | 
| 57 |  |  | extern int  symrad;                     /* current symbol radius */ | 
| 58 |  |  |  | 
| 59 |  |  | extern double  xmin, xmax,              /* extrema */ | 
| 60 |  |  | ymin, ymax; | 
| 61 |  |  |  | 
| 62 |  |  | extern double  xsize, ysize;            /* coordinate dimensions */ | 
| 63 |  |  |  | 
| 64 |  |  | extern double  xmnset, xmxset,          /* domain settings */ | 
| 65 |  |  | ymnset, ymxset; | 
| 66 |  |  |  | 
| 67 |  |  | extern short  logx, logy;               /* flags for logarithmic axes */ | 
| 68 |  |  |  | 
| 69 |  |  | extern short  grid;                     /* flag for grid */ | 
| 70 |  |  |  | 
| 71 |  |  | extern short  polar;                    /* flag for polar coordiates */ | 
| 72 |  |  |  | 
| 73 |  |  | extern int    ncurves;                  /* number of curves in file */ | 
| 74 |  |  |  | 
| 75 | schorsch | 1.4 | extern char *instr(char  *s, char  *t); | 
| 76 |  |  | extern char *snagquo(register char  *s); | 
| 77 |  |  | extern void normalize(FILE  *fp, FILE *fout); | 
| 78 |  |  | extern void initialize(void); | 
| 79 |  |  | extern void option(char *s); | 
| 80 |  |  | extern int istitle(char *s); | 
| 81 |  |  | extern int isdata(char *s); | 
| 82 |  |  | extern int islabel(char *s); | 
| 83 |  |  | extern int isdivlab(char *s); | 
| 84 |  |  | extern int isxlabel(char *s); | 
| 85 |  |  | extern int isylabel(char *s); | 
| 86 |  |  | extern void makeaxis(int flag); | 
| 87 |  |  | extern int getdata(char  *s, double  *xp, double  *yp); | 
| 88 |  |  | extern void boxstring(int a0, int xmn, int ymn, int xmx, int ymx, char  *s); | 
| 89 |  |  | extern void symout(int  a0, int  x, int  y, char  *sname); | 
| 90 | schorsch | 1.3 |  | 
| 91 |  |  | #ifdef __cplusplus | 
| 92 |  |  | } | 
| 93 |  |  | #endif | 
| 94 |  |  | #endif /* _RAD_TGRAPH_H_ */ | 
| 95 |  |  |  |