Display of graph
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi. I have manage to plot sin(x) by calling gnuplot but the display of the graph is only for a split second. How do I make the graph show longer or continue displaying until the 'x' button (exit) is clicked? The following are my codes:
pid = _popen("wgnuplot.exe", "w"); cfile = fopen("cSinx.txt", "r"); if ((pid > 0) && (cfile > 0)) { printf("Open file suceeded!\n"); system("wgnuplot.exe cSinx.txt"); _pclose(pid); }
cSinx.txt is a file where I put the command