Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

networkx.drawing.nx_pylab.draw_spring

draw_spring(G, **kwargs)[source]

Draw the graph G with a spring layout.

Parameters
  • G (graph) – A networkx graph

  • kwargs (optional keywords) – See networkx.draw_networkx() for a description of optional keywords, with the exception of the pos parameter which is not used by this function.