Home | Trees | Index | Help |
|
---|
Package NX :: Package drawing :: Module nx_pylab |
|
Draw networks with matplotlib/pylab.
Function Summary | |
---|---|
Draw NX graph using spring layout. | |
Draw NX graph in circular layout | |
Draw NX graph with nodes at node_pos. | |
Draw NX graph using pydot and graphviz layout. | |
Draw NX graph without labels in textbook style. | |
Draw pydot graph P with matplotlib. | |
Draw a pydot network P that has nested subgraphs. | |
Draw NX graph with random layout. | |
Draw NX graph with shell layout | |
Draw NX graph with spectral layout. | |
Draw NX graph with spring layout | |
Draw NX graph using spring layout | |
Draw network with matplotlib using node positions=node_pos and edge positions=edge_pos. |
Variable Summary | |
---|---|
str |
__author__ = 'Aric Hagberg (hagberg@lanl.gov)'
|
str |
__credits__ = ''
|
str |
__date__ = '$Date: 2005/04/09 00:29:03 $'
|
str |
__revision__ = '$Revision: 1.12 $'
|
Function Details |
---|
draw(G, **kwargs)Draw NX graph using spring layout. NB: pylab.draw() has been renamed to pylab.redraw() so use redraw() from pylab interface. |
draw_circular(G, **kwargs)Draw NX graph in circular layout |
draw_nx(G, node_pos, **kwargs)Draw NX graph with nodes at node_pos. See layout.py for functions that compute node positions. node_pos is a dictionary keyed by vertex with a two-tuple of x-y positions as the value. Use kwarg of node_color with a dictionary keyed by vertex with a floating point number as a value. Use kwarg of node_size with a dictionary keyed by vertex with a floating point number as a value. |
draw_nxpydot(G, **kwds)Draw NX graph using pydot and graphviz layout. >>> G=barbell_graph(5,10) >>> d=G.degree(with_labels=True) >>> draw_nxpydot(G) >>> draw_nxpydot(G,node_color=d,cmap=cm.pink) >>> draw_nxpydot(G,prog='neato') Can use prog= "neato", "dot", "circo", "twopi", or "fdp" |
draw_nxpydot_nolabels(G, **kwargs)Draw NX graph without labels in textbook style. node_color is black, unless specified in kwargs (with node_color= a dictionary that maps each key=node to a floating point number.) e.g. >>> G=star_graph(10) >>> d=G.degree(with_labels=True) >>> draw_nxpydot_nolabels(G) >>> draw_nxpydot_nolabels(G,node_color=d,cmap=cm.pink) >>> draw_nxpydot_nolabels(G,prog='neato') Can use prog= "neato", "dot", "circo", "twopi", or "fdp" |
draw_pydot(P, **kwargs)Draw pydot graph P with matplotlib. The pydot graph must have position information in graphviz dot format. |
draw_pydot_subgraph(ax, P, **kwds)Draw a pydot network P that has nested subgraphs. |
draw_random(G, **kwargs)Draw NX graph with random layout. |
draw_shell(G, **kwargs)Draw NX graph with shell layout |
draw_spectral(G, **kwargs)Draw NX graph with spectral layout. |
draw_spring(G, **kwargs)Draw NX graph with spring layout |
drawg(G, **kwargs)Draw NX graph using spring layout |
mpl_network(ax, node_pos, edge_pos, node_size=300, node_color='r', node_marker='o', node_labels=True, fonts={}, edge_color='k', edge_width=1.0, cmap=None, norm=None, vmin=None, vmax=None, alpha=1.0, digraph=False)Draw network with matplotlib using node positions=node_pos and edge positions=edge_pos. Steals heavily from matplotlib.axes.scatter. |
Variable Details |
---|
__author__
|
__credits__
|
__date__
|
__revision__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Apr 11 10:59:20 2005 | http://epydoc.sf.net |