html - gnuplot 发出警告 : Skipping data file with no valid points

标签 html graph gnuplot

我正在使用 gnuplot 脚本

    #qe.conf
set terminal png truecolor
set output "qe.png"
set xrange ["400" : "700"]
set yrange ["0" : "1"]
set style data lines
plot "qe.txt" using 1:2 title "%Red", '' using 1:3 title "%G-r", '' using 1:4 title "%G-b", '' using 1:5 title "%R"

我正在通过 shell 脚本执行 gnuplot 脚本 qe.conf 它给了我以下错误

gnuplot> plot "qe.txt" using 1:2 title "%Red", '' using 1:3 title "%G-r", '' using 1:4 title "%G-b", '' using 1:5 title "%R" ^ line 0: warning: Skipping data file with no valid points

gnuplot> 使用 1:2 标题绘制“qe.txt”“%Red”,''使用 1:3 标题 "%G-r", '' 使用 1:4 标题 "%G-b", '' 使用 1:5 标题 "%R" ^ 第 0 行:警告:跳过没有有效点的数据文件

gnuplot> 使用 1:2 标题绘制“qe.txt”“%Red”,''使用 1:3 标题 "%G-r", '' 使用 1:4 标题 "%G-b", '' 使用 1:5 标题 "%R" ^ 第 0 行:警告:跳过没有有效点的数据文件

gnuplot> 使用 1:2 标题绘制“qe.txt”“%Red”,''使用 1:3 标题 "%G-r", '' 使用 1:4 标题 "%G-b", '' 使用 1:5 标题 "%R" ^ 第 0 行:警告:跳过没有有效点的数据文件

但是当我手动执行 q​​e.conf 时,我工作正常

数据文件在这里。

400.0   0.3625060772
410.0   0.445987595886
420.0   0.503862994331
430.0   0.534251869841
440.0   0.576047041939
450.0   0.594211326218
460.0   0.58079588866
470.0   0.506666961836
480.0   0.495652452097
490.0   0.426107864611
500.0   0.342632041157
510.0   0.251232093174
520.0   0.178015786221
530.0   0.140803848655
540.0   0.120063881639
550.0   0.0995420648319
560.0   0.080193952073
570.0   0.0730989150532
580.0   0.0708069989426
590.0   0.0688014659014
600.0   0.0597099385221
610.0   0.0481330987744
620.0   0.042010859344
630.0   0.0425115579982
640.0   0.0460125024438
650.0   0.0515227545961
660.0   0.0559745367996
670.0   0.0629981328342
680.0   0.0573046109671
690.0   0.0688715871636
700.0   0.0742304568215

`

谁能提出解决方案?

大家好,经过几个小时的尝试,我仍然没有答案。 我尝试了以下内容。我尝试为数据文件、gnuscript 和 shell 脚本提供绝对路径。 如果从 linux 命令提示符运行命令 gnuplot qe.conf 工作正常,但是当通过 shell 脚本运行时会出现此错误。

line 10: warning: Skipping data file with no valid points

请求帮助。

最佳答案

每次尝试绘制 .csv(逗号分隔变量)文件时都会出现此错误,我忘记了有时需要提醒 gnuplot 分隔符是什么。通常我会遇到您提到的相同错误,有时我不会收到任何错误,但在任何一种情况下,在正确定义分隔符之前都不会绘制任何数据。

gnuplot 默认使用空格作为分隔符,但也许您覆盖了它并将其设置为逗号或其他内容。尝试告诉 gnuplot 您的分隔符是什么。

设置数据文件分隔符“”

设置数据文件分隔符空白

然后当然对于逗号尝试 "," 和制表符将尝试 "\t"

我发现最好将 set datafile separator "" 放在脚本的顶部,以提醒自己。

关于html - gnuplot 发出警告 : Skipping data file with no valid points,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26767359/

相关文章:

javascript - onclick 随机选择模式对话框

html - 如何防止 float div 不扩展 sibling

algorithm - 图的任意两个顶点之间存在循环

algorithm - 在图中找到从 s 到所有顶点的最短路径

gnuplot - 控制gnuplot中xticks的频率

gnuplot - 增加聚集条形图(直方图)中 xtic 之间的间距

javascript - 用jquery定位div

javascript - 选择下拉菜单在 Firefox 中提供空白选项

graph - Raphael 的折线图库可以绘制不一致的时间序列数据吗?

function - 可以定义对输入数据进行操作的函数吗