Draw the graph G using Matplotlib.
Draw the graph with Matplotlib with options for node positions, labeling, titles, and many other drawing features. See draw() for simple drawing without labels or axes.
Parameters : | G : graph
pos : dictionary, optional
ax : Matplotlib Axes object, optional
with_labels: bool, optional :
nodelist: list, optional :
edgelist: list :
node_size: scalar or array :
node_color: color string, or array of floats :
node_shape: string :
alpha: float :
cmap: Matplotlib colormap :
vmin,vmax: floats :
width`: float :
edge_color: color string, or array of floats :
edge_ cmap: Matplotlib colormap :
edge_vmin,edge_vmax: floats :
style: string :
labels: dictionary :
font_size: int :
font_color: string :
font_weight: string :
font_family: string :
|
---|
See also
draw, draw_networkx_nodes, draw_networkx_edges, draw_networkx_labels, draw_networkx_edge_labels
Examples
>>> G=nx.dodecahedral_graph()
>>> nx.draw(G)
>>> nx.draw(G,pos=nx.spring_layout(G)) # use spring layout
>>> import pylab
>>> limits=pylab.axis('off') # turn of axis
Also see the NetworkX drawing examples at http://networkx.lanl.gov/gallery.html