/*******************************************************/
/* Linux GNU C++ Compiler */
/* Name : fastpictex.h */
/* Autor: Harald Stauss */
/*******************************************************/
#ifndef FPICTEX
#define FPICTEX
#define MAX_FIELD_LENGTH 256
#define WHITE_SPACE " \t\n\0"
#define NSYMBOL 10 /* number of different plot symbols */
#define N_XTICKS 5 /* number of ticks on x-scale */
#define N_YTICKS 5 /* number of ticks on y-scale */
#define BARWIDTH 0.8 /* How much space is used for bar graphs 0-1 */
#include <string.h>
class FASTPICTEX {
typedef struct {
short type; /* type of graph: 0:ndef, 1:xy, 2:line, 3:bar */
short tline; /* trendline for xy: 0:no, 1:yes no formula, 2: yes with formula */
float m1, m2, b; /* linear regression line parameters */
unsigned long nreg; /* number of data points for regression line */
unsigned long ndata, nx, ny, ndx, ndy; /* number of data points */
float *x; /* pointer to x values */
float *y; /* pointer to y values */
float *dx; /* pointer to x-errors */
float *dy; /* pointer to y-errors */
char **sig; /* pointer to sig. signs */
char *legend; /* pointer to legend string */
}
SERIES;
/* Get Extrema */
int GetExtrema(short is_limit, float x1, float x2, float *xmin, float *xmax, float *ymin, float *ymax);
public:
float width, height; /* width and height of graph */
short nofseries; /* number of series */
short nofbar; /* number of bar graph series */
short linenoxmax; /* fist line graph without x-values */
short noftline; /* number of trendlines */
short xgrid, ygrid; /* if 1 draw x/y-gridlines */
char *xlabel, *ylabel, *heading; /* various labels */
unsigned long nxticlabels; /* number of ticlabels */
char **xticlabels; /* pointers to x tic labels */
int nofrawpictex; /* number of pictex commands */
char **rawpictex; /* raw pictex commands */
SERIES *series; /* pointer to an array of SERIES */