samedi 28 mars 2015

Generating mutilple plots from GNU in c



I've got many files having data to plot in a single gnu window using c. My current code is



gnuplotPipe = popen ("gnuplot -persistent", "w");
//loop starts for each file
system("gnuplot -p -e \"plot 'file_variable'""); // skipping some steps to generate variable file name
//end loop
fclose(gnuplotPipe);


It is generating graphs in individual windows. How to combine all of them in one?


Files format are like



2 0.000003
2 0.000002
2 0.000002


in file_2.txt



3 0.000001
3 0.000000
3 0.000001


in file_3.txt



.
.
.


in file_n.txt n is between 3 and 98



99 0.004800
99 0.004752
99 0.004716


in file_99.txt.


Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire