Can gnuplot be called directly from another program to output a graphics image file from a set of gnuplot commands? The way I am doing this now is to start an instance of wgnuplot.exe and "send" it commands which finish with an exit command, thereby closing the running instance of wgnuplot.exe . This means wnuplot briefly becomes another running program What I would rather do is call gnuplot directly, for example as a routine in a file like wgnuplot.DLL, and pass it a string argument containing the commands to be executed. There would be no need for an interactive command window or a plot window. All I want is to create a png graphics file.
Is this possible?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply, Alain. gnuplotc looks like a step in the right direction, but it seems to be limited to 2d plots. I am creating 3D plots. Can it do 3d plots?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am working on a Windows system.
Can gnuplot be called directly from another program to output a graphics image file from a set of gnuplot commands? The way I am doing this now is to start an instance of wgnuplot.exe and "send" it commands which finish with an exit command, thereby closing the running instance of wgnuplot.exe . This means wnuplot briefly becomes another running program What I would rather do is call gnuplot directly, for example as a routine in a file like wgnuplot.DLL, and pass it a string argument containing the commands to be executed. There would be no need for an interactive command window or a plot window. All I want is to create a png graphics file.
Is this possible?
You might have a look at the sourceforge Gnuplot/C project https://sourceforge.net/p/gnuplotc
Also, you may pass gnuplot commands using popen in C.
Thanks for the reply, Alain. gnuplotc looks like a step in the right direction, but it seems to be limited to 2d plots. I am creating 3D plots. Can it do 3d plots?