linux - gnuplot 中吞吐量的明显差异

标签 linux plot gnuplot throughput iperf

我正在比较两种情况下无线链路的吞吐量,我想将它们都绘制在一张图中。问题是通过绘制吞吐量随时间变化得到的图就是这张图

first graph

当我在同一张图中绘制两个吞吐量时,我得到了第二张图片中的内容 second graph两者之间的区别尚不清楚。

我在下面使用这段代码绘制了一个吞吐量图

#!/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 b c > 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"

输出如下所示:enter image description here

最佳答案

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

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

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

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

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

关于linux - gnuplot 中吞吐量的明显差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23326538/

相关文章:

plot - Gnuplot 用图像绘制二维矩阵,想要为每个单元格绘制边框

gnuplot : handle tsv file with missing (empty) data

linux - 为什么NTP监听的是广播IP

python-3.x - Seaborn分类图的问题

linux - 类型错误执行 aapt : Cannot run program "/opt/android-sdk-linux/build-tools/19.0.1/aapt": java. io.IOException

r - 厨师距离的 dotplot_diag(lmer 模型)- 主题值而不是索引

python - Seaborn.countplot : order categories by count, 也按类别?

ubuntu - gnuplot : Aborted (core dumped)

c - Fork() 和父/子进程

linux - Python//读取给定输入后的行