-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathplot.sh
executable file
·30 lines (28 loc) · 2.36 KB
/
plot.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# to distinguish multiple runs (if needed)
prefix="$1"
for id in 'line' 'rtree' 'grid4'; do
gnuplot -e "
set title \"Reachability on a $id of 49 nodes with 100MBit/s - 1ms latency links.\n200 random pings in 2 seconds for each test point.\"; \
set terminal pngcairo size 1280,960; \
set output '${prefix}convergence1-$id.png'; \
set grid back lc rgb '#808080' lt 0 lw 1; \
set border 3 back lc rgb '#808080' lt 1; \
set tics nomirror; \
set key spacing 2 font 'sans, 18'center right; \
set ylabel 'packets arrived [%]'; \
set xlabel 'wait after start [sec]'; \
set termoption lw 3; \
set ytics 10; \
plot \
'${prefix}convergence1-babel-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'dark-violet' title 'babel', \
'${prefix}convergence1-batman-adv-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'skyblue' title 'batman-adv', \
'${prefix}convergence1-bmx6-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'dark-yellow' title 'bmx6', \
'${prefix}convergence1-bmx7-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'gold' title 'bmx7', \
'${prefix}convergence1-cjdns-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'dark-red' title 'cjdns', \
'${prefix}convergence1-olsr1-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'coral' title 'olsr1', \
'${prefix}convergence1-olsr2-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'green' title 'olsr2', \
'${prefix}convergence1-yggdrasil-$id.csv' using ((column('software_ms') + column('offset_ms')) / 1000):(100 * column('packets_received') / column('packets_send')) with linespoints linetype rgb 'purple' title 'yggdrasil' \
; \
"
done