【发布时间】:2014-01-02 10:13:18
【问题描述】:
我正在尝试使用 xtics 作为时间信息绘制直方图。我正在使用的 gp 脚本是这个:
set style data histogram
set style histogram cluster gap 1
set boxwidth 1
set datafile separator "\t"
set yrange[0:3000]
set xlabel "xaxis"
set ylabel "yaxis"
set xdata time
set timefmt "%Y-%m-%d %H"
set terminal png size 1200,800
set output outputfile
plot inputfile u 2:1 title "Count"
我的输入文件(我通过参数传递)的一个例子是这个:
2012-07-22 00:00:00 159.361111111
2012-07-22 01:00:00 207.019166667
2012-07-22 02:00:00 191.749722222
2012-07-22 03:00:00 147.647777778
2012-07-22 04:00:00 107.751388889
2012-07-22 05:00:00 95.9566666667
2012-07-22 06:00:00 110.405277778
2012-07-22 07:00:00 151.689166667
2012-07-22 08:00:00 244.787777778
2012-07-22 09:00:00 481.601388889
但是我收到错误“plot_timeflow.gp”,第 16 行:使用规范时的列太多,当我尝试将 plot 命令设置为绘制 inputfile u 2:xticlabels(1) 标题“Count”时以下错误:“plot_timeflow.gp”,第 16 行:需要完整使用 x 时间数据的规范。
有人有什么想法,有什么问题吗??
提前致谢。
【问题讨论】:
标签: gnuplot