This post contains NS2 Script (TCL Script) to simulate a simple Wireless Network. The simulation involves wireless nodes which move from one position to another occasionally.
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.