Leptonica 1.54
|
Макросы | |
#define | L_BUF_SIZE 512 |
#define | MAX_NUM_GPLOTS 40 |
Функции | |
GPLOT * | gplotCreate (const char *rootname, l_int32 outformat, const char *title, const char *xlabel, const char *ylabel) |
void | gplotDestroy (GPLOT **pgplot) |
l_int32 | gplotAddPlot (GPLOT *gplot, NUMA *nax, NUMA *nay, l_int32 plotstyle, const char *plottitle) |
l_int32 | gplotSetScaling (GPLOT *gplot, l_int32 scaling) |
l_int32 | gplotMakeOutput (GPLOT *gplot) |
l_int32 | gplotGenCommandFile (GPLOT *gplot) |
l_int32 | gplotGenDataFiles (GPLOT *gplot) |
l_int32 | gplotSimple1 (NUMA *na, l_int32 outformat, const char *outroot, const char *title) |
l_int32 | gplotSimple2 (NUMA *na1, NUMA *na2, l_int32 outformat, const char *outroot, const char *title) |
l_int32 | gplotSimpleN (NUMAA *naa, l_int32 outformat, const char *outroot, const char *title) |
GPLOT * | gplotRead (const char *filename) |
l_int32 | gplotWrite (const char *filename, GPLOT *gplot) |
Переменные | |
const char * | gplotstylenames [] |
const char * | gplotfilestyles [] |
const char * | gplotfileoutputs [] |
#define L_BUF_SIZE 512 |
#define MAX_NUM_GPLOTS 40 |
l_int32 gplotAddPlot | ( | GPLOT * | gplot, |
NUMA * | nax, | ||
NUMA * | nay, | ||
l_int32 | plotstyle, | ||
const char * | plottitle | ||
) |
Input: gplot nax (<optional> numa: set to null for Y_VS_I; required for Y_VS_X) nay (numa: required for both Y_VS_I and Y_VS_X) plotstyle (GPLOT_LINES, GPLOT_POINTS, GPLOT_IMPULSES, GPLOT_LINESPOINTS, GPLOT_DOTS) plottitle (<optional> title for individual plot) Return: 0 if OK, 1 on error
Notes: (1) There are 2 options for (x,y) values: o To plot an array vs the index, set nax = NULL. o To plot one array vs another, use both nax and nay. (2) If nax is defined, it must be the same size as nay. (3) The 'plottitle' string can have spaces, double quotes and backquotes, but not single quotes.
GPLOT* gplotCreate | ( | const char * | rootname, |
l_int32 | outformat, | ||
const char * | title, | ||
const char * | xlabel, | ||
const char * | ylabel | ||
) |
Input: rootname (root for all output files) outformat (GPLOT_PNG, GPLOT_PS, GPLOT_EPS, GPLOT_X11, GPLOT_LATEX) title (<optional> overall title) xlabel (<optional> x axis label) ylabel (<optional> y axis label) Return: gplot, or null on error
Notes: (1) This initializes the plot. (2) The 'title', 'xlabel' and 'ylabel' strings can have spaces, double quotes and backquotes, but not single quotes.
void gplotDestroy | ( | GPLOT ** | pgplot | ) |
Input: &gplot (<to be="" nulled>="">) Return: void
Input: gplot Return: 0 if OK, 1 on error
Input: gplot Return: 0 if OK, 1 on error
Input: gplot Return: 0 if OK; 1 on error
Notes: (1) This uses gplot and the new arrays to add a plot to the output, by writing a new data file and appending the appropriate plot commands to the command file. (2) The gnuplot program for windows is wgnuplot.exe. The standard gp426win32 distribution does not have a X11 terminal.
GPLOT* gplotRead | ( | const char * | filename | ) |
Input: filename Return: gplot, or NULL on error
Input: gplot scaling (GPLOT_LINEAR_SCALE, GPLOT_LOG_SCALE_X, GPLOT_LOG_SCALE_Y, GPLOT_LOG_SCALE_X_Y) Return: 0 if OK; 1 on error
Notes: (1) By default, the x and y axis scaling is linear. (2) Call this function to set semi-log or log-log scaling.
Input: na (numa; plot Y_VS_I) outformat (GPLOT_PNG, GPLOT_PS, GPLOT_EPS, GPLOT_X11, GPLOT_LATEX) outroot (root of output files) title (<optional>, can be NULL) Return: 0 if OK, 1 on error
Notes: (1) This gives a line plot of a numa, where the array value is plotted vs the array index. The plot is generated in the specified output format; the title is optional. (2) When calling this function more than once, be sure the outroot strings are different; otherwise, you will overwrite the output files.
l_int32 gplotSimple2 | ( | NUMA * | na1, |
NUMA * | na2, | ||
l_int32 | outformat, | ||
const char * | outroot, | ||
const char * | title | ||
) |
Input: na1 (numa; we plot Y_VS_I) na2 (ditto) outformat (GPLOT_PNG, GPLOT_PS, GPLOT_EPS, GPLOT_X11, GPLOT_LATEX) outroot (root of output files) title (<optional>) Return: 0 if OK, 1 on error
Notes: (1) This gives a line plot of two numa, where the array values are each plotted vs the array index. The plot is generated in the specified output format; the title is optional. (2) When calling this function more than once, be sure the outroot strings are different; otherwise, you will overwrite the output files.
Input: naa (numaa; we plot Y_VS_I for each numa) outformat (GPLOT_PNG, GPLOT_PS, GPLOT_EPS, GPLOT_X11, GPLOT_LATEX) outroot (root of output files) title (<optional>) Return: 0 if OK, 1 on error
Notes: (1) This gives a line plot of all numas in a numaa (array of numa), where the array values are each plotted vs the array index. The plot is generated in the specified output format; the title is optional. (2) When calling this function more than once, be sure the outroot strings are different; otherwise, you will overwrite the output files.
Input: filename gplot Return: 0 if OK; 1 on error
const char* gplotfileoutputs[] |
{"", "PNG", "PS", "EPS", "X11", "LATEX"}
const char* gplotfilestyles[] |
{"LINES", "POINTS", "IMPULSES", "LINESPOINTS", "DOTS"}
const char* gplotstylenames[] |
{"with lines", "with points", "with impulses", "with linespoints", "with dots"}