wifi-clear-channel-cnu.cc gnuplot

75 views
Skip to first unread message

Saagar C

unread,
Dec 7, 2011, 3:53:35 AM12/7/11
to ns-3-users, susm...@gmail.com
Hello,

I am trying to simulate this example code. But when I try plotting a
gnuplot, i get an error saying,

DsssRate1Mbps
^
"wifi.dat", line 1: invalid command

My build was successful and I used the set of following commands:

$ ./waf --run wifi-clear-channel-cmu > wifi.dat
$ gnuplot wifi.dat

need some help in resolving this issue.

Thanks!

Saagar C

unread,
Dec 7, 2011, 4:13:31 AM12/7/11
to ns-3-users
Ok, I see there is a "clear-channel.plt" getting generated after the
execution.
But the graph is incomplete. Can anyone take me further on this?


Thanks,
Sagar

Mitch Watrous

unread,
Dec 7, 2011, 11:19:27 AM12/7/11
to ns-3-users
Hi.

There are 2 common methods to make a plot using ns-3 and gnuplot:

1. Create a gnuplot control file using ns-3‘s Gnuplot class.
2. Create a gnuplot data file using values generated by ns-3.

If you are interested in method 1, see the “Making Plots using the
Gnuplot Class” section in the ns-3 Manual:

http://www.nsnam.org/docs/release/3.12/manual/html/gnuplot.html

If you are interested in method 2, see the “A Real Example” subsection
under the “Tracing” section in the ns-3 Tutorial:

http://www.nsnam.org/docs/release/3.12/tutorial/html/tracing.html

Mitch

Saagar C

unread,
Dec 7, 2011, 1:20:45 PM12/7/11
to ns-3-users
Thanks Mitch!

I finally got to figure out how to plot this graph. But the
clear-channel.eps file which gets generated in the end shows that the
y-axis values are 0 all the time. i.e. the number of packets is 0 all
the time. Any remarks on that??

Thanks
Sagar

Mitch Watrous

unread,
Dec 7, 2011, 1:35:02 PM12/7/11
to ns-3-users
I don't know why.

Mitch

Saagar C

unread,
Dec 7, 2011, 2:16:11 PM12/7/11
to ns-3-users
oh, anyone?

Saagar C

unread,
Dec 8, 2011, 4:41:13 PM12/8/11
to ns-3-users
the author of this code has resolved the bug... and one needs to "hg
pull" and "hg update" to use this...


Thanks!
Sagar

Tom Henderson

unread,
Dec 8, 2011, 4:55:06 PM12/8/11
to ns-3-...@googlegroups.com
On Thu, 8 Dec 2011 13:41:13 -0800 (PST), Saagar C wrote:
> the author of this code has resolved the bug... and one needs to "hg
> pull" and "hg update" to use this...

Or simply apply this patch:

http://code.nsnam.org/ns-3-dev/rev/4da35aed3cb2


Reply all
Reply to author
Forward
0 new messages