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. Advertisements

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:
    868
    Kevin Spencer
    Jan 9, 2006
  2. Newbie

    drawing a graph

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

    Drawing Graph In VC++

    matt, Feb 11, 2004, in forum: C++
    Replies:
    2
    Views:
    7,346
    Howard
    Feb 11, 2004
  4. Ghirai

    Drawing a graph

    Ghirai, Aug 12, 2007, in forum: Python
    Replies:
    8
    Views:
    481
    baalbek
    Aug 18, 2007
  5. adonis

    drawing graph

    adonis, Apr 18, 2008, in forum: C++
    Replies:
    5
    Views:
    650
    SeanW
    Apr 18, 2008
  6. defn noob
    Replies:
    1
    Views:
    605
    Mark Space
    Jun 28, 2008
  7. Emilio Mayorga
    Replies:
    6
    Views:
    638
    Martien Verbruggen
    Oct 8, 2003
  8. Phil
    Replies:
    2
    Views:
    312
    Martien Verbruggen
    Jan 24, 2004
Loading...