gnuplot:扩展数据时间和框

gnuplot:扩展数据时间和框,gnuplot,Gnuplot,我在一个文本文件中有一些温度数据,我想用一个“方框”图来表示它,以直方图的形式显示每天的温度 23 10 2012 12.3 28 10 2012 14.1 30 11 2012 30.4 ... 我想用类似的gnuplot脚本来表示它,如下所示: set terminal png enhanced font font_file size size_x, size_y tiny set xdata time set timefmt "%d %m %Y" set format x "%d" se

我在一个文本文件中有一些温度数据,我想用一个“方框”图来表示它,以直方图的形式显示每天的温度

23 10 2012 12.3
28 10 2012 14.1
30 11 2012 30.4
...
我想用类似的gnuplot脚本来表示它,如下所示:

set terminal png enhanced font font_file size size_x, size_y tiny
set xdata time
set timefmt "%d %m %Y"
set format x "%d"
set boxwidth 0.9 relative
plot u 1:4 w boxes
我想将没有可用数据的日子留空,但gnuplot给出了这些日子数据可用的最后一天的值。例如,在我之前编写的数据文件中,gnuplot将给出10月23日的12.3分,但是我想不带任何限制地留下这个间隙

有办法得到这个吗?我已经讨论了直方图表示法,因为我读到它与时间数据不兼容


提前感谢您

您的问题是行
设置boxwidth 0.9相对
。Relative说,您正在尝试填充相邻框之间90%的空间。您可能需要设置一个绝对箱宽。如果将脚本更改为
将boxwidth设置为0.9绝对值
,则会看到垂直线。这是因为在使用时间数据时,x轴单位实际上是秒,因此,当x轴标度为多天时,框的宽度仅约为1秒。因此,要使每个框的宽度为一天的宽度,您将使用

set boxwidth 3600*24
以下是完整的脚本:

set term png enhanced
set output 'foo.png'
set xdata time
set timefmt "%d %m %Y"
set format x "%d"
set boxwidth 3600*24
plot 'test.dat' u 1:4 w boxes
以及输出:


我认为你的意思是gnuplot将在10月24日给出
12.3
——在我看来,它应该在23日给出12.3。