Leptonica 1.68
C Image Processing Library

gplot.h

Go to the documentation of this file.
00001 /*====================================================================*
00002  -  Copyright (C) 2001 Leptonica.  All rights reserved.
00003  -  This software is distributed in the hope that it will be
00004  -  useful, but with NO WARRANTY OF ANY KIND.
00005  -  No author or distributor accepts responsibility to anyone for the
00006  -  consequences of using this software, or for whether it serves any
00007  -  particular purpose or works at all, unless he or she says so in
00008  -  writing.  Everyone is granted permission to copy, modify and
00009  -  redistribute this source code, for commercial or non-commercial
00010  -  purposes, with the following restrictions: (1) the origin of this
00011  -  source code must not be misrepresented; (2) modified versions must
00012  -  be plainly marked as such; and (3) this notice may not be removed
00013  -  or altered from any source or modified source distribution.
00014  *====================================================================*/
00015 
00016 #ifndef  LEPTONICA_GPLOT_H
00017 #define  LEPTONICA_GPLOT_H
00018 
00019 /*
00020  *   gplot.h
00021  *
00022  *       Data structures and parameters for generating gnuplot files
00023  */
00024 
00025 #define  GPLOT_VERSION_NUMBER    1
00026 
00027 #define  NUM_GPLOT_STYLES      5
00028 enum GPLOT_STYLE {
00029     GPLOT_LINES       = 0,
00030     GPLOT_POINTS      = 1,
00031     GPLOT_IMPULSES    = 2,
00032     GPLOT_LINESPOINTS = 3,
00033     GPLOT_DOTS        = 4
00034 };
00035 
00036 #define  NUM_GPLOT_OUTPUTS     6
00037 enum GPLOT_OUTPUT {
00038     GPLOT_NONE  = 0,
00039     GPLOT_PNG   = 1,
00040     GPLOT_PS    = 2,
00041     GPLOT_EPS   = 3,
00042     GPLOT_X11   = 4,
00043     GPLOT_LATEX = 5
00044 };
00045 
00046 enum GPLOT_SCALING {
00047     GPLOT_LINEAR_SCALE  = 0,   /* default */
00048     GPLOT_LOG_SCALE_X   = 1,
00049     GPLOT_LOG_SCALE_Y   = 2,
00050     GPLOT_LOG_SCALE_X_Y = 3
00051 };
00052 
00053 extern const char  *gplotstylenames[];  /* used in gnuplot cmd file */
00054 extern const char  *gplotfilestyles[];  /* used in simple file input */
00055 extern const char  *gplotfileoutputs[]; /* used in simple file input */
00056 
00057 struct GPlot
00058 {
00059     char          *rootname;   /* for cmd, data, output            */
00060     char          *cmdname;    /* command file name                */
00061     struct Sarray *cmddata;    /* command file contents            */
00062     struct Sarray *datanames;  /* data file names                  */
00063     struct Sarray *plotdata;   /* plot data (1 string/file)        */
00064     struct Sarray *plottitles; /* title for each individual plot   */
00065     struct Numa   *plotstyles; /* plot style for individual plots  */
00066     l_int32        nplots;     /* current number of plots          */
00067     char          *outname;    /* output file name                 */
00068     l_int32        outformat;  /* GPLOT_OUTPUT values              */
00069     l_int32        scaling;    /* GPLOT_SCALING values             */
00070     char          *title;      /* optional                         */
00071     char          *xlabel;     /* optional x axis label            */
00072     char          *ylabel;     /* optional y axis label            */
00073 };
00074 typedef struct GPlot  GPLOT;
00075 
00076 
00077 #endif /* LEPTONICA_GPLOT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines