MCPcopy Create free account
hub / github.com/creatale/node-dv / gplotSimpleXY1

Function gplotSimpleXY1

deps/leptonica/src/gplot.c:667–695  ·  view source on GitHub ↗

! * \brief gplotSimpleXY1() * * \param[in] nax [optional] * \param[in] nay * \param[in] plotstyle GPLOT_LINES, GPLOT_POINTS, GPLOT_IMPULSES, * GPLOT_LINESPOINTS, GPLOT_DOTS * \param[in] outformat GPLOT_PNG, GPLOT_PS, GPLOT_EPS, GPLOT_LATEX * \param[in] outroot root of output files * \param[in] title [optional], can be NULL * \return 0 if OK,

Source from the content-addressed store, hash-verified

665 * </pre>
666 */
667l_int32
668gplotSimpleXY1(NUMA *nax,
669 NUMA *nay,
670 l_int32 plotstyle,
671 l_int32 outformat,
672 const char *outroot,
673 const char *title)
674{
675GPLOT *gplot;
676
677 PROCNAME("gplotSimpleXY1");
678
679 if (!nay)
680 return ERROR_INT("nay not defined", procName, 1);
681 if (plotstyle < 0 || plotstyle >= NUM_GPLOT_STYLES)
682 return ERROR_INT("invalid plotstyle", procName, 1);
683 if (outformat != GPLOT_PNG && outformat != GPLOT_PS &&
684 outformat != GPLOT_EPS && outformat != GPLOT_LATEX)
685 return ERROR_INT("invalid outformat", procName, 1);
686 if (!outroot)
687 return ERROR_INT("outroot not specified", procName, 1);
688
689 if ((gplot = gplotCreate(outroot, outformat, title, NULL, NULL)) == 0)
690 return ERROR_INT("gplot not made", procName, 1);
691 gplotAddPlot(gplot, nax, nay, plotstyle, NULL);
692 gplotMakeOutput(gplot);
693 gplotDestroy(&gplot);
694 return 0;
695}
696
697
698/*!

Callers 2

gplotSimple1Function · 0.85

Calls 4

gplotCreateFunction · 0.85
gplotAddPlotFunction · 0.85
gplotMakeOutputFunction · 0.85
gplotDestroyFunction · 0.85

Tested by

no test coverage detected