Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在GNUplot中绘制3列?_Gnuplot_Multiple Columns_Axes - Fatal编程技术网

如何在GNUplot中绘制3列?

如何在GNUplot中绘制3列?,gnuplot,multiple-columns,axes,Gnuplot,Multiple Columns,Axes,我有这样的文件: Number Data1 Data2 1 9.10 4.022 2 15.27 3.996 3 21.92 4.004 4 21.19 4.026 5 20.67 4.022 6 20.99 4.000 7 19.80 4.004 8 20.01 3.931 9 20.18 4.004 10 19.78 4.007 我想在X轴上绘制数字,在leftY中绘制Data1,在rightY中绘制Data2,但我不知道怎么做 感谢只是一个简短的带注

我有这样的文件:

Number Data1 Data2
 1  9.10 4.022
 2  15.27 3.996
 3  21.92 4.004
 4  21.19 4.026
 5  20.67 4.022
 6  20.99 4.000
 7  19.80 4.004
 8  20.01 3.931
 9  20.18 4.004
10  19.78 4.007
我想在X轴上绘制数字,在leftY中绘制Data1,在rightY中绘制Data2,但我不知道怎么做


感谢只是一个简短的带注释的示例,使用您保存在文件中的数据
so.dat

# Set ticks for 2nd y axis
set y2tics 
# We don't want to see the left ticks on the right axis
set ytics nomirror

# Set ranges so that the data points are not on the axis
set xrange [0:11]
set yrange [8:23]
set y2range[3.95:4.05]

# use first line of the file for labels
set key autotitle columnhead
# display key in least busy area
set key bottom right

# Title and axis labels
set title "Nice Try"
set xlabel "Number"
set ylabel "Data1"
set y2label "Data2"

plot "so.dat" using 1:2 axes x1y1 with points pointsize 2,\
     "" u 1:3 axes x1y2 w p ps 2 pointtype 6
一个人可以做更多的装饰等,但我认为这是你想要的本质。生成的图表: