ag_layout module

Module ag_layout provides the definition of the functions layoutGraph(), and layoutDoc() for automatically organizing the nodes in a graph or all graphs in a document respectively.

class autograph.ag_layout.NodesToKeepEnum

Bases: object

Enumeration of what nodes to keep when laying out a graph

class autograph.ag_layout.GUIElementsToKeepEnum

Bases: object

Enumeration treatments of gui elements when laying out a graph

class autograph.ag_layout.GraphFlowDirectionEnum

Bases: object

Enumeration layout directions for graphs

class autograph.ag_layout.GraphLayoutAlignment

Bases: object

Enumeration what side of a graph to align when laying out a graph

autograph.ag_layout.layoutGraph(graph, aNodeSpacing=160, aNodeShift=(80, 0), nodesToKeep=0, layoutAlignment=0, commentsToKeep=0, framesToKeep=0, navigationPinsToKeep=0)

Lays out a graph

Parameters:
Returns:

None

autograph.ag_layout.layoutDoc(sbsDoc, aNodeSpacing=160, aNodeShift=(80, 0), nodesToKeep=0, layoutAlignment=0, commentsToKeep=0, framesToKeep=0, navigationPinsToKeep=0)

Layout all graphs in an sbs document

Parameters:
  • sbsDoc – Document to layout

  • aNodeSpacing (int) – distance to keep between nodes when laying them out

  • aNodeShift (tuple of int) – Start position for the laid out graphs

  • nodesToKeep (NodesToKeepEnum) – What nodes to keep in the graph

  • layoutAlignment (GraphLayoutAlignment) – Enum selecting whether to traverse from inputs or outputs

  • commentsToKeep (GUIElementsToKeepEnum) – Whether to delete or keep comments

  • framesToKeep (GUIElementsToKeepEnum) – Whether to delete or keep frames

  • navigationPinsToKeep (GUIElementsToKeepEnum) – Whether to delete or keep navigation pins

Returns:

None