我有两个列的文件,如:
1.2, 3.4
5.6, 7.8
...
Run Code Online (Sandbox Code Playgroud)
如果只有一列,我希望gnuplot在一个坐标系中绘制两个列.含义:X轴显示行号,y轴显示值.
示例:两行的前两个点是(0, 1.2)和(0, 3.4); 第二点(1, 5.6)和(1, 7.8).
我不希望将两列视为x和y值,就像它只是去那样plot "data.txt".
您可以使用保存当前样本编号的零伪列.来自help pseudocolumns:
column(0)
The sequential order of each point within a data set.
The counter starts at 0 and is reset by two sequential blank
Run Code Online (Sandbox Code Playgroud)
例如:
plot 'data.txt' using 0:1, '' using 0:2
Run Code Online (Sandbox Code Playgroud)
空''使用与上一个图相同的数据源.