gnuplot数据有什么问题?

gnuplot数据有什么问题?,gnuplot,Gnuplot,我有以下数据: test.txt 我在使用gnuplot后出现以下错误: plot 'test.txt' ^ all points y value undefined! 请问怎么了 我使用的代码用于多个绘图: set term pngcairo size 800,600 font "Times New Roman,12" set output "f.png" set border lw 1.4 set title off

我有以下数据: test.txt

我在使用gnuplot后出现以下错误:

plot 'test.txt'
                          ^
           all points y value undefined!
请问怎么了

我使用的代码用于多个绘图:

set term pngcairo size 800,600 font "Times New Roman,12"
set output "f.png"
set border lw 1.4
set title offset 0,-0.5
set grid xtics ytics ls -1 lc "gray" 
set tics out nomirror


Row1 = "set tmargin screen 0.92; set bmargin screen 0.40"   
Row2 = "set tmargin screen 0.40; set bmargin screen 0.20"  
Col1 = "set lmargin screen 0.10; set rmargin screen 0.88"   

set multiplot layout 2,1 rowsfirst 

@Row1; @Col1         
set key out horiz bot width 5 reverse Left #box
set tics out nomirror
set xrange [6560.8:6564.8] 
plot 'test.txt' with lines linecolor rgb "black" lw 1.1 title "{/:Bold l}"

@Row2; @Col1           
set key out horiz bot width 5 reverse Left #box
set tics out nomirror
set xrange [6676:6680] 
plot 'test.txt' with lines linecolor rgb "black" lw 1.1 title "{/:Bold l}"

当我想要打印数据时,它会工作。

您的x数据范围从
6540.0
6540.12
。如果你通过

set xrange [6560.8:6564.8] 
...
set xrange [6676:6680] 
不会有相应的y数据。这就是为什么gnuplot告诉您
所有点y值未定义。
如果您对这些行进行注释:

# set xrange [6560.8:6564.8] 

# set xrange [6676:6680] 
您将获得以下信息。顺便说一下,最后我还要补充一点:

unset multiplot
set output

在启动gnuplot(版本5.2 patchlevel 2)并执行
plot'test.txt'
时对我来说效果很好。你能更准确地告诉我们你在做什么来避免这个错误吗?我回答了这个问题
unset multiplot
set output