#

Note

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

#

networkx.drawing.nx_pylab.draw_spectral

draw_spectral(G, **kwargs)[source]

Draw the graph G with a spectral 2D layout.

Using the unnormalized Laplacian, the layout shows possible clusters of nodes which are an approximation of the ratio cut. The positions are the entries of the second and third eigenvectors corresponding to the ascending eigenvalues starting from the second one.

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.