Wednesday, 7 August 2013

NS2 : Xgraph Utility Example


   In this post I have included an NS2 Script (TCL Script) calling the Xgraph utility to plot the graph.

The Xgraph utility is called by the following line of code in the TCL Script,

exec xgraph out0.tr out1.tr out2.tr -geometry 800x400 &


The three files out0.tr, out1.tr and out2.tr contains the input data for Xgraph. To learn about the data format of Xgraph input files read my post Xgraph for plotting in NS-2.

Executing The TCL Script

NAM Window Showing the Simulated Network

NAM Showing Traffic Flow

Graph Plotted Using Xgraph




6 comments:

  1. thank you very much for your tutorial.

    what does the plotted xgraph mean in simple terms?

    ReplyDelete
  2. hi my problem is in the xgraph the y axis is not appear fully for example 250 the reader can only see 50. so can i expand it so the reader can read clearly

    ReplyDelete
  3. Hello
    i want to cretae throughput xgraph of aodv how to do it please help me
    how i can run the awk file and plot the xgraph,what changes do in aodv.tcl file to create throughput xgraph help me.

    ReplyDelete
  4. hiii how to see the xgraph?

    ReplyDelete
  5. I want to change the colour of the line in graph

    ReplyDelete