Tuesday, 3 July 2012

How to color nodes in NS2

You can color the nodes in NS2. It is bit tricky to color them in a wireless network. We can do this by following code.

set node0 [$ns node]
$node0 color "blue"
$ns at 0.0 "$node0 color blue"

 

10 comments:

  1. thanku for useful information

    ReplyDelete
  2. How many types of colors are possible ?
    And also can we mention the color in hexadecimal values like for blue can we write #0000FF ??

    ReplyDelete
  3. thanks for the information.... !!! is it possible to fill a node inside with color..?? please help me..

    ReplyDelete
  4. thx dude, u r the best.

    ReplyDelete
  5. Can you help me change color of the node using C++ in AODV.CC files..??

    ReplyDelete
  6. thats really very very helpful... (y)

    ReplyDelete
  7. thnku its really helpful

    ReplyDelete