Graph layout functions

<< Click to Display Table of Contents >>

Navigation:  Building blocks of QGeNIe > Visual appearance, layout, and navigation >

Graph layout functions

While it is not very likely, it is possible that a model constructed in the Graph View becomes too messy. For such cases, QGeNIe supplies functions that arrange nodes within the Graph View automatically using two graph layout algorithms: Spring Embedder and Parent Ordering. Layout algorithms are computationally complex and their output may be far from perfect from the point of view of a human user. It is generally a good idea to treat their output as a starting point for manual arrangement of nodes.

layout_graph_layout_menu

Spring embedder

The Spring Embedder algorithm (Quinn & Breuer 1979; Eades 1984) is a more sophisticated algorithm of the two and it yields fewer arc crossings and a generally better layout of the graph. It rearranges the positions of the nodes in such a way that the nodes do not overlap each other, arc crossings are minimized, and the layout is readable for the user.

Clicking on the Graph Layout/Spring Embedder opens the following dialog:

spring_embedder_dialog

Ideal arc length specifies the ideal distance (in pixels) between two interconnected nodes. Please note that not all arcs will be of this length, the algorithm may modify this length so as to reduce overlaps.

Iterations specifies the number of iterations for the layout algorithm. Reducing this number, especially for very large networks, will translate directly to shorter execution time.

Randomize positions at startup, if checked, causes node positions to be randomized before running the layout algorithm. If it is not checked, the algorithm receives the original node positions.

Parent ordering

Parent Ordering is a simple algorithm for graph layout that essentially places the elements of the model in top-down or left-to right order starting with the parent-less ancestors and ending with childless descendants. The Graph Layout/Parent Ordering option opens the following dialog:

parent_ordering_dialog

Top to Bottom: This places the nodes in the model in the top to bottom on the graph view.

Left to Right: This places the nodes in the model from left to right on the graph view.

Spacing: This specifies the distance between nodes.