How to generate graph in wireless scenario

Wednesday, September 15, 2010 1:58 AM Posted by naz
Labels: ,

Question: I wanted to know the procedure to get Xgraph or Gnuplot from trace file.
Answer (by Mubashir Husain Rehmani, Paris, France):

As far as gnuplot is concerned, its very easy and there is no need of any
language to learn it. what you have to do is:
1. Install gnuplot in your linux (ubuntu) distribution.
2. Once you are in the directory of gnuplot, just write gnuplot at the command prompt
3. Then once you are in gnuplot command prompt then write load "Graph.p"
4. and see the graph.
====================
Code for file Graph.p
====================
set title "Relationship between Two functions"
set xlabel "First function"
set ylabel "Second function"

set xrange [0.0:100]
set yrange [0.00:10]

set grid
set boxwidth 15

plot "Graph.tr"  using 1:2 with lines lt 1 lw 2 title ''; replot

set term post eps enhan color
set out "Graph.eps"; replot
=====================
Data present in Graph.tr
=====================
0    0
10    3.16
20    4.47
30    5.48
40    6.32
50    7.07
60    7.75
70    8.37
80    8.94
90    9.49
100    10

Source

Comments (0)

Post a Comment