Skip to content

Gnuplot Script for Routing Over Head, Packet Delivery Ratio and End-to-End Delay

Here are my gnuplot script to make a graph using gnuplot. In this case I compared 3 AODV routing protocols .

ROH.gplot script

#To displat any the data, run gnuplot, and type
#   load "ROH.gplot"
set ylabel "Routing Over Head (Bytes)"
set xlabel "Pause Time (s)"
set xrange [0:500]
set yrange [0:10000]
set key right bottom box
plot "/home/abdusy/Documents/aodv-simulation/data-compare/ui-roh.txt" using 1:2 title "AODV-UI" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/ali-roh.txt" using 1:2 title "AODV+" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/uu-roh.txt" using 1:2 title "AODV-UU" with linespoint

PDR.gplot script

#To display any the data, run gnuplot, and type
#   load "PDR.gplot"
set yrange [50:105]
set ylabel "Packet Delivery Ratio (%)"
set xlabel "Pause Time (s)"
set xrange [0:500]
set key right bottom box
plot "/home/abdusy/Documents/aodv-simulation/data-compare/ui-pdr.txt" using 1:2 title "AODV-UI" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/ali-pdr.txt" using 1:2 title "AODV+" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/uu-pdr.txt" using 1:2 title "AODV-UU" with linespoint

E2E.gplot script

#To display any the data, run gnuplot, and type
#   load "E2E.gplot"
set yrange [0:0.005]
set ylabel "Av.End-to-End Delay (s)"
set xlabel "Pause Time (s)"
set xrange [0:500]
set key right bottom box
plot "/home/abdusy/Documents/aodv-simulation/data-compare/ui-e2e.txt" using 1:2 title "AODV-UI" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/ali-e2e.txt" using 1:2 title "AODV+" with linespoint
replot "/home/abdusy/Documents/aodv-simulation/data-compare/uu-e2e.txt" using 1:2 title "AODV-UU" with linespoint

To use this script, you have to go to your directory where you put your data. As you can see, I put all my data in “/home/abdusy/Documents/aodv-simulation/data-compare/”. Then type ‘gnuplot’, it will show :

gnuplot >
gnuplot > load "E2E.gplot"

end-to-end delay

3 thoughts on “Gnuplot Script for Routing Over Head, Packet Delivery Ratio and End-to-End Delay”

  1. Hi ,I need awk script for calculating routing overhead in ns2 ,I am comparing protocols like aodv and olsr so I need them I searched a lot in ns mailing list but can’t find the correct one .Can you please upload it here on your blog?

  2. Thanks for one’s marvelous posting! I truly enjoyed reading it, you will be a great author.I will make sure to bookmark your blog and will often come back sometime soon. I want to encourage you to ultimately continue your great job, have a nice evening!

Leave a Reply

Your email address will not be published. Required fields are marked *