Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Gnuplot扩展数据时间错误的绘图_Bash_Gnuplot - Fatal编程技术网

Bash Gnuplot扩展数据时间错误的绘图

Bash Gnuplot扩展数据时间错误的绘图,bash,gnuplot,Bash,Gnuplot,嗨,我有一个小问题,我不能生成正确的绘图时间和许多点,当我尝试绘图组数据 我的示例在bps.sh文件中输入数据 17/03/17 17:36:30;20411.000 17/03/17 17:36:40;23928.000 17/03/17 17:36:56;1914.000 17/03/17 17:37:07;23375.000 17/03/17 17:37:17;23712.000 17/03/17 17:37:28;22587.000 17/03/17 17:37:38;23505.000

嗨,我有一个小问题,我不能生成正确的绘图时间和许多点,当我尝试绘图组数据

我的示例在bps.sh文件中输入数据

17/03/17 17:36:30;20411.000
17/03/17 17:36:40;23928.000
17/03/17 17:36:56;1914.000
17/03/17 17:37:07;23375.000
17/03/17 17:37:17;23712.000
17/03/17 17:37:28;22587.000
17/03/17 17:37:38;23505.000
17/03/17 17:37:49;21050.000
17/03/17 17:38:00;13137.000
17/03/17 17:38:10;20664.000
我的剧本

set title "Analysing speed WAN\nwith date curl -L -w google.com "
unset multiplot
set xdata time
set style data dots
#set style fill solid 1.0
set datafile separator ";"
set xlabel "Date\nTime"
set timefmt "%d/%m/%y %H%M%S"
set format x "%H\n%d/%m"
#set yrange [ 0 : ]
set xdata time
set autoscale  xy
set ylabel "Speeed \nbytes/s"
set grid
set term png size 1440,720
set output "speedtest.png"
plot 'bps.sh' using 1:2 t 'bytes/s' w points
当我使用扩展数据时间生成时,我有以下输出: 数据看起来像是分组的

但是,当我使用更简单的数据而没有时间时,文件中只有第二列

cat bps.sh| awk 'FS=";" {print $2}' > dot && gnuplot -persist <(echo -n "plot 'dot'  with points")

cat bps.sh|awk'FS=“;”{print$2}>dot&&gnuplot-persist在第一个图中,数据四舍五入为“整小时”。这是因为您将输入格式指定为

set timefmt "%d/%m/%y %H%M%S"
但实际数据是
%d/%m/%y%H:%m:%S“


如果没有
s,Gnuplot只解析了小时,而忽略了其余的(分/秒),因此数据点被有效地分组到大小为1小时的容器中。

谢谢,我看不出我的错误。现在它工作得很好:)