I want my program to automatically open GNUplot and plot the graph from the given file. Unfortunetaly it does not work properlly:
system("gnuplot> plot '/home/user/Desktop/program/data.txt'");
The programm runs gnuplot but I constantyly get an error from gnuplot:
ivalid command
Moreover I checked in the command line and when typing:
gnuplot> plot '/home/user/Desktop/program/data.txt'
I also get the same error, but when first typing gnuplot and then
plot '/home/user/Desktop/program/data.txt'
it works properly.
Hence the conclusion is that I should use the second method in my programm (but I don't know how to put a few commands using system() or to fix the first method. Thanks for your help!!!