【发布时间】:2015-03-28 09:10:07
【问题描述】:
我有很多包含数据的文件,我想在一个 gnuplot 窗口中绘制所有数据。我正在使用 C。我当前的代码是
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);
它在各个窗口中生成图表。如何将它们合二为一?
文件格式类似
2 0.000003
2 0.000002
2 0.000002
在file_2.txt
3 0.000001
3 0.000000
3 0.000001
在file_3.txt
.
.
.
在file_n.txt中,n 介于 3 和 98 之间
99 0.004800
99 0.004752
99 0.004716
在file_99.txt。
任何帮助将不胜感激。
【问题讨论】:
-
你忘了包括你的问题。
-
我虽然从标题中很明显,但感谢提及,我也在添加当前代码。