Package networkx :: Package drawing :: Module layout

[frames | no frames]

## Module networkx.drawing.layout

Layout (positioning) algorithms for graph drawing.

Function Summary
| ``circular_layout`(G, dim)` Circular layout.
| ``graph_low_ev_pi`(uhat, G, eps, iterations)` Power Iteration method to find smallest eigenvectors of Laplacian(G).
| ``random_layout`(G, dim)` Random layout.
| ``shell_layout`(G, nlist, dim)` Shell layout.
| ``spectral_layout`(G, dim, vpos, iterations, eps)` Return the position vectors for drawing G using spectral layout.
| ``spring_layout`(G, iterations, dim, node_pos)` Spring force model layout

Variable Summary
`str` | `__author__` = `'Aric Hagberg (hagberg@lanl.gov)\nDan Schul...`
`str` | `__credits__` = `''`
`str` | `__date__` = `'$Date: 2005-06-15 08:53:26 -0600 (Wed, 15 Ju...`
`str` | `__revision__` = `'$Revision: 1033 $'`

Function Details

### circular_layout(G, dim=2)

Circular layout.

Crude version that doesn't try to minimize edge crossings.

### graph_low_ev_pi(uhat, G, eps=0.001, iterations=10000)

Power Iteration method to find smallest eigenvectors of Laplacian(G). Note: constant eigenvector has eigenvalue=0 but is not included in the count of smallest eigenvalues.

uhat -- list of p initial guesses (dicts) for the p eigenvectors. G -- The Graph from which Laplacian is calculated. eps -- tolerance for norm of change in eigenvalue estimate. iterations -- maximum number of iterations to use.

### random_layout(G, dim=2)

Random layout.

### shell_layout(G, nlist=None, dim=2)

Shell layout. Crude version that doesn't try to minimize edge crossings.

nlist is an optional list of lists of nodes to be drawn at each shell level. Only one shell with all nodes will be drawn if not specified.

### spectral_layout(G, dim=2, vpos=None, iterations=1000, eps=0.001)

Return the position vectors for drawing G using spectral layout.

### spring_layout(G, iterations=50, dim=2, node_pos=False)

Spring force model layout

Variable Details

### __author__

  Type:
    `str`
  Value:

        '''Aric Hagberg (hagberg@lanl.gov)
        Dan Schult(dschult@colgate.edu)'''

### __credits__

  Type:
    `str`
  Value:

        ''

### __date__

  Type:
    `str`
  Value:

        '$Date: 2005-06-15 08:53:26 -0600 (Wed, 15 Jun 2005) $'

### __revision__

  Type:
    `str`
  Value:

        '$Revision: 1033 $'

Generated by Epydoc 2.1 on Sun Aug 21 08:06:58 2005 | http://epydoc.sf.net