Friday, February 13, 2015

Quick Start: gnuplot - multiline graph

- Download and install gnuplot: http://www.gnuplot.info
- Creat a file data.txt:

Time    TX    RX    Total
1    0.00%    0.95%    0.95%
2    0.00%    1.03%    1.03%
3    0.09%    0.83%    0.92%
4    0.09%    1.09%    1.17%
5    0.00%    0.69%    0.69%
6    0.09%    1.07%    1.16%
7    0.00%    1.02%    1.02%
8    0.09%    1.15%    1.25%
9    0.09%    0.85%    0.94%
10    0.00%    0.92%    0.92%
11    0.18%    0.98%    1.16%
12    0.18%    1.19%    1.37%
13    0.18%    1.36%    1.54%
14    0.23%    1.30%    1.52%
15    0.00%    0.89%    0.89%
16    0.09%    1.17%    1.26%
17    0.09%    1.26%    1.35%
18    0.00%    1.13%    1.13%
19    0.18%    1.28%    1.46%
20    0.09%    0.84%    0.93%

- Run in gnuplot>

set xlabel 'Time (s)'
set ylabel 'Duty Cycle (%)'
set yrange [0:2]
set xrange [1:20]
set key autotitle columnheader
plot "data.txt" u 1:2 w linespoints lt -1 pt 5 dt 5, '' u 1:3 w linespoints lt -1 pt 4 dt 2, '' u 1:4 w linespoints lt -1 pt 3

- Output

2 comments:

  1. Hello sir,

    I want to calculate latency using collect-view application in rpl-collect example. Is it possible to measure? If yes then how can it be possible? I tried to add code in collect-common.c file but I can't succeeded .

    Please help me to solve this problem.

    Thanks
    Vishal

    ReplyDelete
  2. Maybe you can record the sending time in the sender mote and send it to the sink, which in turn passes it to the collect-view. Here you track the arriving time and calculate the latency.

    ReplyDelete