Graph Drawing

Discussion in 'Python' started by subhabangalore@gmail.com, Jan 2, 2013.

  1. Guest

    Dear Group,

    In networkx module we generally try to draw the graph as,
    >>> import networkx as nx
    >>> G=nx.Graph()
    >>> G.add_edge(1, 2, weight=4.7 )
    >>> G.add_edge(1, 3, weight=4.5 )

    ......

    Now, if I want to retrieve the information of traversal from 1 to 3, I can give,
    G.edges()

    but I am looking for a command or function by which I can get not only the node names but also the weights.

    If anyone in the room can kindly suggest?

    Regards,
    Subhabrata.

    NB: Apology for any indentation error, etc.
    , Jan 2, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    621
    Kevin Spencer
    Jan 9, 2006
  2. Newbie

    drawing a graph

    Newbie, May 14, 2005, in forum: Java
    Replies:
    8
    Views:
    570
    Amit Chatterjee
    May 18, 2005
  3. matt

    Drawing Graph In VC++

    matt, Feb 11, 2004, in forum: C++
    Replies:
    2
    Views:
    7,127
    Howard
    Feb 11, 2004
  4. defn noob
    Replies:
    1
    Views:
    372
    Mark Space
    Jun 28, 2008
  5. Emilio Mayorga
    Replies:
    6
    Views:
    317
    Martien Verbruggen
    Oct 8, 2003
Loading...

Share This Page