Gnuplot没有绘制线条

时间:2015-02-26 04:08:12

标签: printing line gnuplot

我的问题是gnuplot没有绘制任何行。这适用于linespointslines。这是我的剧本:

set terminal postscript 
set output "bla.eps"                                                         
set datafile separator "\t"     
set autoscale                                                                  
set grid
set yrange [0:12]                                                              
unset log
unset label                                                                    
set xtic auto   
set xtics font "Times-Roman, 10"                                               
set ytic auto 

plot "times.dat" using 1:($4/1000):xtic(1) title "naive" with linespoints lc rgb "red" pt 7 ps 1.3   

我的.dat文件的第一列包含一些我希望作为文本整理的数据,而其他列则是数字。我只是看不到屏幕上印有任何线条。积分很好。即使我将第一列设为数字列,或者我使用lines,也没关系,没有线。任何线索?

2 个答案:

答案 0 :(得分:4)

绘制点,但没有连接线的典型原因是数据文件中存在空行:

考虑数据文件

1

2

3

绘图
plot 'data.dat' using 0:1 with linespoints

它只绘制点,但没有连接线。

此行为旨在允许您构建数据文件,在所需位置获取这些连续性,并允许您使用everyindex访问数据文件的不同部分(当有两个空行)。

答案 1 :(得分:0)

这看起来似乎已被打破。我知道文件中有空行 但这是出乎意料的行为。

使用带有线点的1:2绘制“data.txt”

用于在点之间绘制线条,但现在它只是绘制点; 因为空白......

$ gnuplot --version gnuplot 5.0 patchlevel 3