I wrote a computer simulation program (the details are irrelevant) that writes on two files some results in a 2 colums format, then i used gnuplot from another terminal to plot these results on a graph, successfully. Now i want to integrate the graph with the program, so that i don't have to run gnuplot from another terminal. so
/*while loop that writes data on the 2 files, the data is consistent as the graphs are good running gnuplot from a separate terminal
*/
fclose(file_wait);
fclose(file_discarted);
system("gnuplot -p -e \"plot 'wait.dat'\"");
system("gnuplot -p -e \"plot 'discarted.dat'\"");
The funny thing is that this program work when the file has less than 1000 lines (the full data set is 2600 lines) more that that and the program terminates but the grapsh aren't visualized.