I would like to use gnuplot for some of my data visualization and call it directly from my Visual C++ program. I found John Campbell's gplotlib (FAQ 5.2) as an option, however it seems to work only under Unix. I also looked at Hans-Bernhard Broeker pgnuplot (FAQ 6.8), however i could not find any user instructions how interface gnuplot under Win32. Can anyone help me out?!
The method to use pgnuplot is the popen() function of your compiler's runtime system (may be called _popen() instead). It returns a FILE *
which you then "print" commands to. Alternatively, you may have a closer look at the source code of pgnuplot.exe, pgnuplot.c. The bulk of the documentation of pgnuplot is in the source.
In principle, it should also be possible to integrate the most central parts of it directly into your own program, so you don't have to go through another external program.
And, BTW: it's usually better to ask questions directly in one of the mailing lists, instead of this forum, which is largely unused.
Log in to post a comment.