明确gnuplot吞吐量的差异

我比较了两种情况下无线链路的吞吐量,我想把它们都绘制在一张图中。 问题是通过绘制吞吐量与时间所得到的图如图所示

第一张图

当我在同一个图中绘制两个吞吐量的时候,我得到了第二张图中的东西 第二个图 目前还不清楚两者之间的区别。

我使用下面的代码来绘制一个吞吐量图

#!/usr/bin/gnuplot reset !iperf -c 192.168.1.101 -i 0.5 -t 60 > a #this is used for deleting first 6 lines !sed -i 1,+5d a #used to delete last line !sed '$d' a > cropped !cat cropped | cut -c 7-10 > b !cat cropped | cut -c 35-38 > c !paste bc > d !awk 'BEGIN{print "0.0 0.0"}{print}' d > e set xlabel "time" set ylabel "throughput" set terminal png nocrop enhanced font arial 8 size 900,300 #set terminal png size 900, 300 set output "chart_1.png" #table name below graph(naming curve by colour) set key below plot 'e' using 1:2 title "Throughput Performance" with lines 

下面是我用来绘制这两个图的代码

 #!/usr/bin/gnuplot reset set xlabel "time" set ylabel "throughput" set terminal png nocrop enhanced font arial 8 size 900,300 #set terminal png size 900, 300 set output "chart_1.png" #table name below graph(naming curve by colour) set key below set style data linespoints plot "1" using 1:2 title "case1", \ "2" using 1:2 title "case2" 

输出如下所示: 在这里输入图像描述

首先作为一般评论:使用提供更好的抗锯齿的pngcairo终端。

为了处理你的数据,你可以使用不同的平滑选项,比如smooth csplinessmooth bezier或者类似的smooth bezier (参见例如在交互式gnuplot终端中的help smooth ):

 plot "1" using 1:2 smooth csplines, "2" using 1:2 smooth csplines 

您使用的平滑变体取决于数据的含义。

还有什么可以帮助的,就是使用其他的点类型,然后是默认的点类型,例如pt 1代表第一个, pt 7代表第二个,参见Gnuplot行类型以使用test命令来检查可用的点类型。