Welcome to LQ.
Example, typical "xgraph" in an ns2 simulation :
exec xgraph out02.tr out12.tr out22.tr out32.tr -geometry 800x400 -P -bg white &
( From exUDP.tcl : $ grep -n xgraph exUDP.tcl ).
Please see the examples, xgraph_ns2-files-tcl_11.2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
-