GNUPLOT警告:第21行:警告:跳过没有有效点的数据文件

时间:2014-10-25 14:28:58

标签: gnuplot

我是gnuplot的新手,我试图使用脚本绘制图表但是在运行脚本时我收到警告并且输出.png文件没有显示任何内容。

Warning is : line 21: warning: Skipping data file with no valid points

我使用的脚本是:

#set title "Max Gain Approach"
frontier = "#99ffff"; hybrid = "#4671d5"
set ylabel "a" font "Times,18"
set xlabel "b" font "Times,18" offset 0,1
set auto x
set grid
set yrange [0:0.8]
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.9
set xtic scale 0
set output "123.png"

set key spacing 2 font "Times,18"

set xtics font "Times,16"
set ytics font "Times,16"

# 2, 3, 4, 5 are the indexes of the columns; 'fc' stands for 'fillcolor'
plot 'cqmr1.dat' using 2:xtic(1) ti col fc rgb frontier, '' u 3 ti col fc rgb hybrid

pause 10

数据文件cqmr1.dat是:

Title "Max Gain Approach" Frontier

"10"    0.7902
"15"    0.6834
"20"    0.6589
"25"    0.6123
"30"    0.5678

1 个答案:

答案 0 :(得分:0)

输出文件不包含任何内容,因为在处于交互模式时必须明确地关闭它。放一个

set output
在plot命令之后

(是的,没有任何参数)。

然后你会看到一组盒子。警告来自您的第二个情节部分('' u 3 ...)。您的绘图文件没有第三列,因此没有数据可以绘制。

相关问题