Download
as PDF

Tree Layout

Using a tree layout is especially suitable if the input graph is a tree or a collection of trees. A tree is a graph that contains no undirected cyclic edge path. If the input graph is not a tree, it is transformed into one by temporarily removing some edges.

If the layout style is set to Directed, the tree layout can also handle so-called multi-parent structures, i.e., multiple nodes that share (exactly) the same predecessors as well as the same successors. This means that each successor of such nodes has multiple parents. All nodes belonging to such a structure are placed side by side and the incident edges are routed in a bus-style fashion.
Note that multi-parent structures are arranged in the aforementioned way only if option Enforce Global Layering is disabled and option Child Placement Policy is not set to "All Leaves in same Layer".

General Tab

Layout Style

The layout style determines the overall style of the resulting tree layout. The remaining option tabs allow for the configuration of the chosen layout style in more detail.

Directed
The tree will be laid out hierarchically with the root node at the top. This is a good choice for directed trees with a unique root node and a moderate number of nodes on a single hierarchy level. This layout style uses the input graph as a sketch to determine the order of siblings at a common node. This means that the order of x-coordinates of the nodes in the input graph determines the order of siblings in the resulting layout.
Horizontal-Vertical
The children of a node will be either arranged on a horizontal or on a vertical line. The edges will be routed orthogonally in a bus-like fashion. This layout can be very compact if the user has chosen the right alignment type for the children of a node. Subgraphs rooted at selected nodes will be laid out vertically. Subgraphs rooted at unselected nodes will be laid out horizontally.
Compact
Generates compact orthogonal tree drawings. As a layout constraint a preferred aspect ratio (relation of width to height) can be given. This is especially useful when the graph should fit perfectly on a page of given size.

Routing Style for Non-Tree Edges

Determines the routing style for all non-tree edges.
(Note: Tree and non-tree edges are determined automatically.)

Organic
Organic routing.
Orthogonal
Orthogonal routing.
Straight-Line
Straight-line routing.
Bundled
Bundled routing. Edge paths will be routed such that the common parts of different edges are to some degree merged into a bundled part.

Act on Selection Only

Whether or not to act on selected nodes and edges that are connected to selected nodes only.

Bundling Strength

Determines how tightly the edges are merged/bundled for Routing Style for Non-Tree Edges Bundled. The higher this value, the stronger the connection of the bundled edges.

Directed Tab

These options configure the layout style Directed in more detail.

Minimal Node Distance

Determines the minimal distance between the siblings of a node.

Minimal Layer Distance

Determines the minimal distance between parent and child nodes.

Orientation

Determines the main layout orientation. The layouter tries to arrange nodes in such a way that all edges point in the main layout direction.

Top to Bottom
The main layout orientation will be from top to bottom. Note that the documentation for the other layout options assumes that this default layout orientation is being used.
Bottom to Top
The main layout orientation will be from bottom to top.
Left to Right
The main layout orientation will be from left to right.
Right to Left
The main layout orientation will be from right to left.

Port Style

Determines the port assignment policy to be used.

Node Centered
Ports will be placed in the center of the corresponding nodes.
Border Centered
Ports will be placed in the center of the border of the corresponding nodes.
Border Distributed
Ports will be distributed along the border of the corresponding nodes.
Consider Port Constraints
Ports will be distributed according to the specified port constrains. Note that the sides specified by port constraints are only considered for ports at children. Furthermore, they are ignored for nodes of a multi-parent structure.

Consider Node Labels

Whether or not node labels should be considered during layout calculation.

Consider Edge Labels

Whether or not edge labels should be considered during layout calculation.

Orthogonal Edge Routing

If set, all edges will be routed orthogonally in a bus-like fashion. If not set, the edges will be routed as straight-line segments.

Edge Bus Alignment

Determines the relative placement of the bus-like routing of edges that connect to child nodes.

Child Alignment

Determines the placement of same-layer child nodes relative to each other.

Top
The top border of child nodes will be aligned.
Center
The geometric center of child nodes will be aligned.
Bottom
The bottom border of child nodes will be aligned.

Child Placement Policy

This option determines the layer assignment for child nodes. Depending on the selected child placement policy, an optimal area utilization can be achieved.

Siblings in Same Layer
This setting configures the algorithm to place siblings (nodes with the same parent node) in the same layer. This means that all sibling nodes are aligned on the same horizontal line. This option is useful in order to make a graph vertically more compact.
All Leaves in Same Layer
This setting configures the algorithm to place leaves (nodes without children) in a Dendrogram-like style. This means that all leaf nodes in the tree are placed in the same layer (i.e all leaf nodes in the tree are aligned on one horizontal line). A Dendrogram layout is often applied in computational biology in order to show clustering of genes. This policy does not support multi-parent structures.
Leaves stacked
This setting configures the algorithm for a stacked style of leaf nodes. This results in a horizontally compact arrangement. Leaf nodes are placed both left and right of the corresponding bus axis.
Leaves stacked left
This setting configures the algorithm for a stacked style of leaf nodes. This results in a horizontally compact arrangement. All leaf nodes are placed left of the corresponding bus axis.
Leaves stacked right
This setting configures the algorithm for a stacked style of leaf nodes. This results in a horizontally compact arrangement. All leaf nodes are placed right of the corresponding bus axis.

Enforce Global Layering

If set, the algorithm ensures that all nodes of same depth are placed in the same layer. This means, that all nodes which have the same distance to the root node (distance = number of edges on the shortest path connecting two nodes), are placed on the same horizontal line.
This setting is useful, if the hierarchical structure of the tree should be more distinguished.
If global layering is enforced, multi-parent structures are not supported.

Horizontal-Vertical Tab

These options configure the layout style Horizontal-Vertical in more detail. Subgraphs rooted at selected nodes will be laid out vertically. Subgraphs rooted at unselected nodes will be laid out horizontally.

Horizontal Spacing

The minimal horizontal distance between adjacent nodes.

Vertical Spacing

The minimal vertical distance between adjacent nodes.

Compact Tab

These options configure the layout style Compact in more detail. Children rooted at selected nodes will be laid out in vertical columns. Children rooted at unselected nodes will be laid out in horizontal rows.

Horizontal Spacing

The minimal horizontal distance between adjacent nodes.

Vertical Spacing

The minimal vertical distance between adjacent nodes.

Bend Distance

Determines the preferred minimal distance between two consecutive bends, between source port and first bend, and between target port and last bend. In other words, this setting determines the preferred minimal length for the line segments of an edge path.

Use Aspect Ratio of View

The current aspect ratio of the view will be used to determine the preferred aspect ratio of the calculated drawing.

Preferred Aspect Ratio

Determines the preferred aspect ratio (width by height) of the resulting layout. This option allows for creating layouts which for example fit perfectly onto the page of a book.

This option will only be respected if the Use Aspect Ratio of View option is disabled.