1
/*====================================================================*
2
- Copyright (C) 2001 Leptonica. All rights reserved.
3
- This software is distributed in the hope that it will be
4
- useful, but with NO WARRANTY OF ANY KIND.
5
- No author or distributor accepts responsibility to anyone for the
6
- consequences of using this software, or for whether it serves any
7
- particular purpose or works at all, unless he or she says so in
8
- writing. Everyone is granted permission to copy, modify and
9
- redistribute this source code, for commercial or non-commercial
10
- purposes, with the following restrictions: (1) the origin of this
11
- source code must not be misrepresented; (2) modified versions must
12
- be plainly marked as such; and (3) this notice may not be removed
13
- or altered from any source or modified source distribution.
14
*====================================================================*/
16
#ifndef LEPTONICA_GPLOT_H
17
#define LEPTONICA_GPLOT_H
22
* Data structures and parameters for generating gnuplot files
25
#define GPLOT_VERSION_NUMBER 1
27
#define NUM_GPLOT_STYLES 5
32
GPLOT_LINESPOINTS = 3,
36
#define NUM_GPLOT_OUTPUTS 6
47
GPLOT_LINEAR_SCALE = 0, /* default */
48
GPLOT_LOG_SCALE_X = 1,
49
GPLOT_LOG_SCALE_Y = 2,
50
GPLOT_LOG_SCALE_X_Y = 3
53
extern const char *gplotstylenames[]; /* used in gnuplot cmd file */
54
extern const char *gplotfilestyles[]; /* used in simple file input */
55
extern const char *gplotfileoutputs[]; /* used in simple file input */
59
char *rootname; /* for cmd, data, output */
60
char *cmdname; /* command file name */
61
struct Sarray *cmddata; /* command file contents */
62
struct Sarray *datanames; /* data file names */
63
struct Sarray *plotdata; /* plot data (1 string/file) */
64
struct Sarray *plottitles; /* title for each individual plot */
65
struct Numa *plotstyles; /* plot style for individual plots */
66
l_int32 nplots; /* current number of plots */
67
char *outname; /* output file name */
68
l_int32 outformat; /* GPLOT_OUTPUT values */
69
l_int32 scaling; /* GPLOT_SCALING values */
70
char *title; /* optional */
71
char *xlabel; /* optional x axis label */
72
char *ylabel; /* optional y axis label */
74
typedef struct GPlot GPLOT;
77
#endif /* LEPTONICA_GPLOT_H */