Partial Layout Demo

Shows how to integrate (new) graph elements into an existing graph layout with PartialLayout.

This layout algorithm changes the coordinates of a given set of graph elements (called partial elements) and leaves the location and size of all other elements (called fixed elements) unchanged. The algorithm aims to place the partial elements such that the resulting drawing (including the fixed elements) has a good quality with respect to common graph drawing aesthetics.

Partial node elements can be assigned to the so called subgraph components. During the layout process each subgraph induced by the nodes of a component is first laid out using the specified subgraph layout. Then, the different components are placed one-by-one onto the drawing area such that the number of overlaps among graph elements is small. The user can specify different placement strategies for finding 'good' positions for subgraph components.

The demo allows for specifying fixed and partial elements. Fixed elements are drawn grey and partial elements are colored. To change the fixed/partial state of elements, select the corresponding elements and click on the Lock Selected Elements or Unlock Selected Elements-button. The current state of the selected elements can be toggled with a mouse-double-click. To start the partial layout click on the play button.

Different scenarios for hierarchic, orthogonal, organic or circular layout are available. A scenario includes a graph arranged with the corresponding layout style and some new graph elements that shall be placed by PartialLayout. In addition suitable configuration options are preset.

Layout Settings

Configuration Options

Component Assignment
Partial nodes as single nodes or in connected components with a common subgraph layout.
Subgraph Layout
The layout algorithm to apply to subgraph components: hierarchic, orthogonal, organic or circular. Furthermore, the components can remain Unchanged.
Subgraph Positioning Strategy
Subgraph components can either be close to the barycenter of its graph neighbors or close to its original position (From Sketch).
Edge Routing Style
Partial edges and edges between different subgraph components (so-called inter-edges) are either routed Straightline, Orthogonal or Organic.
The algorithm can also automatically choose a suitable routing strategy.
Layout Orientation
The layout orientation for the layout of subgraph components. Automatic specifies that the orientation should be determined automatically.
Minimum Node Distance
The minimum distance between two adjacent nodes.
Allow Mirroring
Allows mirroring of subgraph components to improve the layout quality.
Node Snapping:
The algorithm tries to align nodes with each other.