如何在gnuplot中绘制重复数据文件?

时间:2014-11-18 14:05:44

标签: plot gnuplot

我有一个这样的数据文件,它是从每个执行周期的java模拟生成的:

DATA 1

param e_flexmin:
 ref b62 a55 b59 b61 a54 b58 b60 b57 c56 685:=
0 0.0 0.0 144.83432 138.41179 137.30862 145.19685 132.39265 140.12773 147.20264 0.0 0.0
15 0.0 0.0 144.15657 137.72978 136.63087 144.52235 131.72316 139.45973 146.53413 0.0 0.0
30 0.0 0.0 143.40382 136.97528 135.87813 143.77286 130.99066 138.70398 145.78664 0.0 0.0
45 0.0 0.0 142.73958 136.29828 135.21388 143.10211 130.34142 138.02823 145.13889 0.0 0.0
60 0.0 0.0 142.08682 135.63078 134.56113 142.44136 129.70117 137.36223 144.48538 0.0 0.0
75 0.0 0.0 141.28008 134.80453 133.75438 141.75436 128.91891 136.53923 143.73514 0.0 0.0



DATA 2

param e_flexmax:
 ref b62 a55 b59 b61 a54 b58 b60 b57 c56 685:=
0 0.0 0.0 147.00682 140.58429 139.48112 147.36935 135.49014 142.30023 149.37514 0.0 0.0
15 0.0 0.0 148.26907 141.84229 140.74338 148.63486 137.68564 143.57224 150.64664 0.0 0.0
30 0.0 0.0 149.53133 143.10278 142.00563 149.90036 139.89314 144.83148 151.91414 0.0 0.0
45 0.0 0.0 150.80208 144.36078 143.27638 151.16461 142.1039 146.09073 153.20139 0.0 0.0
60 0.0 0.0 152.07683 145.62077 144.55113 152.43137 144.31615 147.35223 154.47539 0.0 0.0
75 0.0 0.0 153.35258 146.87703 145.82689 153.82686 146.5414 148.61174 155.80763 0.0 0.0

这里DATA 1和DATA 2写在同一个文件中,我该如何单独绘制它们? 换句话说:

plot'DATA1' from 'mydata.dat'
plot'DATA2' from 'mydata.dat'

如您所见,DATA1和DATA2由行空格分隔。

1 个答案:

答案 0 :(得分:1)

index关键字允许您在多数据集文件中选择特定数据集以进行绘图。 有关更多信息,请在gnuplot的提示符后键入help index