2 つの状況でワイヤレス リンクのスループットを比較しています。両方を 1 つのグラフにプロットしたいと思います。問題は、スループットを時間に対してプロットして得られたグラフがこの図のようになることです
両方のスループットを同じグラフにプロットすると、この 2 番目の図 のように、2 つを区別するのが明確ではありません。
以下のコードを使用して、単一のスループット グラフをプロットしました。
#!/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"
出力は次のようになります。