Skip to main content

Home/ Python Programming/ Group items matching "networkx" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
1More

XGraph plot dot showing multiple edges - networkx-discuss | Google Groups - 0 views

  • For example edge labels can be added using matplotlib "text" objects like this: import networkx as nx import pylab as plot K=nx.XGraph(name="Konigsberg", multiedges=True, selfloops=False) K.add_edges_from([("A","B","Honey Bridge"),     ("A","B","Blacksmith's Bridge"),     ("A","C","Green Bridge"),     ("A","C","Connecting Bridge"),     ("A","D","Merchant's Bridge"),     ("C","D","High Bridge"),     ("B","D","Wooden Bridge")]) pos=nx.spring_layout(K) nx.draw_nx(K,pos) xa,ya=pos['A'] xb,yb=pos['B'] plot.text((xa+xb)/2,(ya+yb)/2,"Blacksmith's Bridge") plot.show() With a little work you can get the label rotated and exactly how you want it positioned.  You can also set the node positions directly in the "pos" dictionary above.
1More

pydot - Google Code - 0 views

  •  
    most of this seems built into networkx
1More

Nabble - Python Graph Theory sources - 0 views

  • For drawing you can use pygraphviz (also available at networkx.lanl.gov) or the built-in drawing tools.
1 - 4 of 4
Showing 20 items per page