[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coloured nodes in nams



PMF wrote:

> Hi Judith,
>
> Could it be something as silly as having run out of colours in your palette?
> Are you having a colourful backgroung or displaying pictures at the same
> time?
>
> Pablo
>
> Judith Mathewson wrote:
>
> > Ingela Anderton wrote:
> >
> > > Hi Judith
> > >
> > > Judith Mathewson wrote:
> > > > Hi everyone,
> > > >
> > > > This is a really simple question that I am having trouble with in
> > nams.
> > > >
> > > > I would like to make certain nodes of a different colour from the
> > rest
> > > > and I would like to do the same thing with links.  I was wondering
> > how
> > > > to do this,  I have tried with the following commands in the nam
> > script
> > > > file:
> > > >
> > > > ecolor $n1 $n2 green  # to make the link between n1 and n2 green
> > > > ncolor $n1 red                # to make the node n1 red
> > > >
> > > > However none of these colours appear, all the nodes and links are in
> >
> > > > black.
> > > > I would appreciate any help that anyone can offer.
> > >
> > > I know you can color nodes by doing the following:
> > >
> > > set node(0) [$ns node]
> > > $node(0) color "blue"
> > >
> > > You can color packets by setting a colorindex corresponding to the
> > packts
> > > flow ID to a certain color.
> > >
> > > ex:
> > > $ns color 1 red
> > >
> > > set tcp [new Agent/TCP]
> > > $tcp set fid_ 1
> > >
> > > Will make the packets sent by this tcp agent red.
> > >
> > >
> > > I don't know how to color the link :(
> > >
> > > --
> > > /Ingela
> > >
> > > //The highway of life is always under construction. //
> > >
> > >                 |\      _,,,--,,_  ,)
> > >                 /,`.-'`'   -,  ;-;;'
> > >                |,4-  ) )-,_ ) /\
> > >               '---''(_/--' (_/-'
> >
> >   Hi everyone,
> >
> > I have tried all the hints that you have given me without any success.
> > I am
> > working with PIM-SM.  I would like to be able to have colored nodes in
> > my
> > nam.  I have tried writing
> >
> > set node(0) [$ns node]
> > $node(0) color "blue"
> >
> > in my script to run PIM-SM but it doesn't work.  I get an error message
> > saying:
> >
> > _o76: unable to dispatch method color
> >     while executing
> > "$n14 color "blue""
> >
> > I have tried the command
> >
> > ecolor $n1 $n2 green  # to make the link between n1 and n2 green
> > ncolor $n1 red                # to make the node n1 red
> >
> > in my nam script file but it just gives me black nodes and links.
> >
> > I would appreciate any hints that anyone could give me.
> >
> > Thanks ,
> >
> > Judith

  No not at all,  I do not have a colourful background or pictures running at
the same time.  But thanks for the suggestion anyway.

Judith