Tulip plugins documentation

In this section, you can find some documentation regarding the C++ algorithm plugins bundled in the Tulip software but also with the Tulip Python modules installable through the pip tool. In particular, an exhaustive description of the input and output parameters for each plugin is given. To learn how to call all these algorithms in Python, you can refer to the Applying an algorithm on a graph section. The plugins documentation is ordered according to their type.

Warning

If you use the Tulip Python bindings trough the classical Python interpreter, some plugins (Color Mapping, Convolution Clustering, File System Directory, GEXF, SVG Export, Website) require the tulipgui module to be imported before they can be called as they use Qt under the hood.

Algorithm

To call these plugins, you must use the tlp.Graph.applyAlgorithm() method. See also Calling a general algorithm on a graph for more details.

Acyclic

Description

Tests whether a graph is acyclic or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Acyclic', graph)

success = graph.applyAlgorithm('Acyclic', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Biconnected

Description

Tests whether a graph is biconnected or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Biconnected', graph)

success = graph.applyAlgorithm('Biconnected', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Connected

Description

Tests whether a graph is connected or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected', graph)

success = graph.applyAlgorithm('Connected', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Curve edges

Description

Computes quadratic or cubic bezier paths for edges

Parameters

name

type

default

direction

description

layout

tlp.LayoutProperty

viewLayout

input

The input layout of the graph.

curve roundness

float

0.5

input

Parameter for tweaking the curve roundness. The value range is from 0 to 1 with a maximum roundness at 0.5.

curve type

tlp.StringCollection

QuadraticContinuous

Values:
QuadraticContinuous
QuadraticDiscrete
QuadraticDiagonalCross
QuadraticStraightCross
QuadraticHorizontal
QuadraticVertical
CubicContinuous
CubicVertical
CubicDiagonalCross
CubicVerticalDiagonalCross
CubicStraightCrossSource
CubicStraightCrossTarget

input

The type of curve to compute (12 available: 6 quadratics and 6 cubics).

bezier edges

bool

True

input

If activated, set all edge shapes to Bezier curves.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Curve edges', graph)

# set any input parameter value if needed
# params['layout'] = ...
# params['curve roundness'] = ...
# params['curve type'] = ...
# params['bezier edges'] = ...

success = graph.applyAlgorithm('Curve edges', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Delaunay triangulation

Description

Performs a Delaunay triangulation, in considering the positions of the graph nodes as a set of points. The building of simplices (triangles in 2D or tetrahedrons in 3D) consists in adding edges between adjacent nodes.

Parameters

name

type

default

direction

description

simplices

bool

False

input

If true, a subgraph will be added for each computed simplex (a triangle in 2d, a tetrahedron in 3d).

original clone

bool

True

input

If true, a clone subgraph named ‘Original graph’ will be first added.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Delaunay triangulation', graph)

# set any input parameter value if needed
# params['simplices'] = ...
# params['original clone'] = ...

success = graph.applyAlgorithm('Delaunay triangulation', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Directed Tree

Description

Tests whether a graph is a directed tree or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Directed Tree', graph)

success = graph.applyAlgorithm('Directed Tree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Edge bundling

Description

Edges routing algorithm, implementing the intuitive Edge Bundling technique published as:
Winding Roads: Routing edges into bundles
,Antoine Lambert, Romain Bourqui and David Auber, Computer Graphics Forum special issue on 12th Eurographics/IEEE-VGTC Symposium on Visualization, pages 853-862 (2010), doi: <a href=”https://doi.org/10.1111/j.1467-8659.2009.01700.x”>10.1111/j.1467-8659.2009.01700.x</a>

Parameters

name

type

default

direction

description

layout

tlp.LayoutProperty

viewLayout

input

The input layout of the graph.

size

tlp.SizeProperty

viewSize

input

The input node sizes.

grid_graph

bool

False

input

If true, a subgraph corresponding to the grid used for routing edges will be added.

3D_layout

bool

False

input

If true, a 3D input layout is assumed and 3D edge bundling will be performed. Warning: the generated grid graph will be much bigger and the algorithm execution time will be slower compared to the 2D case.

sphere_layout

bool

False

input

If true, a spherical layout of the nodes is assumed. Edges will be then routed along the sphere surface.

long_edges

float

0.9

input

indicates how long edges will be routed. A value less than 1.0 will promote paths outside dense regions of the input graph drawing.

split_ratio

float

10

input

indicates the granularity of the grid that will be generated for routing edges. The higher its value, the more precise the grid is.

iterations

int

2

input

gives the number of iterations of the edge bundling process. The higher its value, the more edges will be bundled.

max_thread

int

0

input

gives the number of threads to use for speeding up the edge bundling process. A value of 0 will use as much threads as processors on the host machine.

edge_node_overlap

bool

False

input

If true, edges can be routed on original nodes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Edge bundling', graph)

# set any input parameter value if needed
# params['layout'] = ...
# params['size'] = ...
# params['grid_graph'] = ...
# params['3D_layout'] = ...
# params['sphere_layout'] = ...
# params['long_edges'] = ...
# params['split_ratio'] = ...
# params['iterations'] = ...
# params['max_thread'] = ...
# params['edge_node_overlap'] = ...

success = graph.applyAlgorithm('Edge bundling', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Equal Value

Description

Performs a graph clusterization grouping in the same cluster the nodes or edges having the same value for a given property.

Parameters

name

type

default

direction

description

Property

tlp.PropertyInterface

viewMetric

input

Property used to partition the graph.

Type

tlp.StringCollection

nodes

Values:
nodes
edges

input

The type of graph elements to partition.

Connected

bool

False

input

If true, the resulting subgraphs are guaranteed to be connected.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Equal Value', graph)

# set any input parameter value if needed
# params['Property'] = ...
# params['Type'] = ...
# params['Connected'] = ...

success = graph.applyAlgorithm('Equal Value', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Free Tree

Description

Tests whether a graph is a free tree or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Free Tree', graph)

success = graph.applyAlgorithm('Free Tree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Graph

Description

Tests whether the set of the selected elements of the current graph is a graph or not (no dangling edges).

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

selection

tlp.BooleanProperty

viewSelection

input

The property indicating the selected elements

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Graph', graph)

# set any input parameter value if needed
# params['result'] = ...
# params['selection'] = ...

success = graph.applyAlgorithm('Graph', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

H3 Layout Helper

Description

Enables to easily configure a H3 layout visualisation for a connected quasi-hierarchical graph. As this is a 3d layout, some rendering setup has to be done after the algorithm execution in order to get an aesthetic rendering of it in Tulip. That plugin takes care of calling the H3 layout algorithm, setting node shapes as sphere, setting edge extremity shapes to cone and set appropriate rendering parameters for 3d layout visualization.

Parameters

name

type

default

direction

description

layout scaling

float

1000

input

the scale factor to apply to the computed layout

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('H3 Layout Helper', graph)

# set any input parameter value if needed
# params['layout scaling'] = ...

success = graph.applyAlgorithm('H3 Layout Helper', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Hierarchical

Description

This algorithm divides the graph in 2 different subgraphs; the first one contains the nodes which have their metric value below the mean, and, the other one, in which nodes have their metric value above that mean value. Then, the algorithm is recursively applied to this subgraph (the one with the values above the threshold) until one subgraph contains less than 10 nodes.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

An existing node metric property.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical', graph)

# set any input parameter value if needed
# params['metric'] = ...

success = graph.applyAlgorithm('Hierarchical', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Acyclic

Description

Makes a graph acyclic.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Acyclic', graph)

success = graph.applyAlgorithm('Make Acyclic', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Biconnected

Description

Makes a graph biconnected.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Biconnected', graph)

success = graph.applyAlgorithm('Make Biconnected', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Connected

Description

Makes a graph connected.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Connected', graph)

success = graph.applyAlgorithm('Make Connected', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Directed Tree

Description

Makes a free tree a directed tree.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Directed Tree', graph)

success = graph.applyAlgorithm('Make Directed Tree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Planar Embedding

Description

Makes the graph a planar embedding if it is planar.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Planar Embedding', graph)

success = graph.applyAlgorithm('Make Planar Embedding', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Simple

Description

Makes a graph simple.
An undirected graph is simple if it has no loops and no more than one edge between any unordered pair of vertices. A directed graph is simple if has no loops and no more than one edge between any ordered pair of vertices.

Parameters

name

type

default

direction

description

directed

bool

False

input

Indicates if the graph should be considered as directed or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Simple', graph)

# set any input parameter value if needed
# params['directed'] = ...

success = graph.applyAlgorithm('Make Simple', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Maximal Cliques Enumeration

Description

Compute all maximal cliques (or maximal cliques whose size is above a given threshold) according to algorithm. published as:
Listing All Maximal Cliques in Sparse Graphs in Near-optimal Time , In: Cheong O., Chwa KY., Park K. (eds) Algorithms and Computation. ISAAC 2010. Lecture Notes in Computer Science, vol 6506. Springer, Berlin, Heidelberg. doi: <a href=”https://doi.org/10.1007/978-3-642-17517-6_36”>10.1007/978-3-642-17517-6_36</a>

Parameters

name

type

default

direction

description

minimum size

int

0

input

Clique minimum size

#cliques created

int

output

Number of cliques (subgraphs) created

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Maximal Cliques Enumeration', graph)

# set any input parameter value if needed
# params['minimum size'] = ...
# params['#cliques created'] = ...

success = graph.applyAlgorithm('Maximal Cliques Enumeration', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Outer Planar

Description

Tests whether a graph is outer planar or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Outer Planar', graph)

success = graph.applyAlgorithm('Outer Planar', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Planar

Description

Tests whether a graph is planar or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planar', graph)

success = graph.applyAlgorithm('Planar', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Planar Embedding

Description

Tests whether a graph is a planar embedding or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planar Embedding', graph)

success = graph.applyAlgorithm('Planar Embedding', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Quotient Clustering

Description

Computes a quotient subgraph (meta-nodes pointing on subgraphs) using an already existing subgraphs hierarchy.

Parameters

name

type

default

direction

description

oriented

bool

True

input

If true, the graph is considered oriented.

node function

tlp.StringCollection

none

Values:
none
average
sum
max
min

input

Function used to compute a measure for a meta-node based on the values of its underlying nodes. If ‘none’, no value is computed.

edge function

tlp.StringCollection

none

Values:
none
average
sum
max
min

input

Function used to compute a measure for a meta-edge based on the values of its underlying edges. If ‘none’, no value is computed.

meta-node label

tlp.StringProperty

input

Property used to label meta-nodes. An arbitrary underlying node is chosen and its associated value for the given property becomes the meta-node label.

use name of subgraph

bool

False

input

If true, the meta-node label is the same as the name of the subgraph it represents.

recursive

bool

False

input

If true, the algorithm is applied along the entire hierarchy of subgraphs.

layout quotient graph(s)

bool

False

input

If true, a force directed layout is computed for each quotient graph.

layout clusters

bool

False

input

If true, a force directed layout is computed for each cluster graph.

edge cardinality

bool

False

input

If true, the property edgeCardinality is created for each meta-edge of the quotient graph (and store the number of edges it represents).

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Quotient Clustering', graph)

# set any input parameter value if needed
# params['oriented'] = ...
# params['node function'] = ...
# params['edge function'] = ...
# params['meta-node label'] = ...
# params['use name of subgraph'] = ...
# params['recursive'] = ...
# params['layout quotient graph(s)'] = ...
# params['layout clusters'] = ...
# params['edge cardinality'] = ...

success = graph.applyAlgorithm('Quotient Clustering', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Reverse edges

Description

Reverse selected edges of the graph (or all if no selection property is given).

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

Only edges selected in this property (or all edges if no property is given) will be reversed.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Reverse edges', graph)

# set any input parameter value if needed
# params['selection'] = ...

success = graph.applyAlgorithm('Reverse edges', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Simple

Description

Tests whether a graph is simple or not.
An undirected graph is simple if it has no loops and no more than one edge between any unordered pair of vertices. A directed graph is simple if has no loops and no more than one edge between any ordered pair of vertices.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

directed

bool

False

input

Indicates if the graph should be considered as directed or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Simple', graph)

# set any input parameter value if needed
# params['result'] = ...
# params['directed'] = ...

success = graph.applyAlgorithm('Simple', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Squarified Tree Map Helper

Description

Enables to easily configure a treemap layout visualisation for a tree. As the treemap layout is different from classical node link diagram representation, some visual properties setup has to be done in order to get an aesthetic visualization of it in Tulip. This plugin takes care of calling the ‘Squarified Tree Map’ layout algorithm and adjust some visual properties to get a correct rendering of the treemap.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

An optional metric used to estimate the size allocated to each node

aspect ratio

float

1

input

The aspect ratio (height/width) for the rectangle corresponding to the root node

treemap type

bool

False

input

If true, use original Treemaps (B. Shneiderman) otherwise useSquarified Treemaps (J. J. van Wijk)

border color

tlp.Color

(255, 255, 255, 255)

input

The border color that will be applied to all treemap nodes

layout

tlp.LayoutProperty

viewLayout

output

The output treemap layout

sizes

tlp.SizeProperty

viewSize

output

The output treemap sizes

shapes

tlp.IntegerProperty

viewShape

output

The output treemap shapes

colors

tlp.ColorProperty

viewColor

output

The output treemap colors

border colors

tlp.ColorProperty

viewBorderColor

output

The output treemap border colors

border widths

tlp.DoubleProperty

viewBorderWidth

output

The output treemap border widths

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Squarified Tree Map Helper', graph)

# set any input parameter value if needed
# params['metric'] = ...
# params['aspect ratio'] = ...
# params['treemap type'] = ...
# params['border color'] = ...
# params['layout'] = ...
# params['sizes'] = ...
# params['shapes'] = ...
# params['colors'] = ...
# params['border colors'] = ...
# params['border widths'] = ...

success = graph.applyAlgorithm('Squarified Tree Map Helper', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Triconnected

Description

Tests whether a graph is triconnected or not.

Parameters

name

type

default

direction

description

result

bool

output

Whether the test succeeded or not.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Triconnected', graph)

success = graph.applyAlgorithm('Triconnected', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Voronoi diagram

Description

Performs a Voronoi decomposition, in considering the positions of the graph nodes as a set of points. These points define the seeds (or sites) of the voronoi cells. New nodes and edges are added to build the convex polygons defining the contours of these cells.

Parameters

name

type

default

direction

description

voronoi cells

bool

False

input

If true, a subgraph will be added for each computed voronoi cell.

connect

bool

False

input

If true, existing graph nodes will be connected to the vertices of their voronoi cell.

original clone

bool

True

input

If true, a clone subgraph named ‘Original graph’ will be first added.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Voronoi diagram', graph)

# set any input parameter value if needed
# params['voronoi cells'] = ...
# params['connect'] = ...
# params['original clone'] = ...

success = graph.applyAlgorithm('Voronoi diagram', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Coloring

To call these plugins, you must use the tlp.Graph.applyColorAlgorithm() method. See also Calling a property algorithm on a graph for more details.

Alpha Mapping

Description

Map metric values to alpha component of graph element colors. In other words, it enables to compute the graph elements transparency according to the values stored in a numeric property of a graph.

Parameters

name

type

default

direction

description

input property

tlp.NumericProperty

viewMetric

input

The input numeric property from which to compute alpha mapping

target

tlp.StringCollection

nodes

input

Whether alpha values are computed for nodes or edges

type

tlp.StringCollection

linear

input

That parameter defines the type of alpha mapping to perform. For the linear case, the minimum value of the input numeric property is mapped to a minimum alpha value picked by the user, the maximum value is mapped to a maximum alpha value picked by the user, and a linear interpolation is used between both to compute the associated alpha of the graph element color.
For the logarithmic case, input numeric properties values are first mapped in the [1, +inf[ range. Then the log of each mapped value is computed and used to compute the associated alpha value of the graph element color trough a linear interpolation between 0 and the log of the mapped maximum value of graph elements.
If uniform, this is the same except for the interpolation: the values are sorted, numbered, and a linear interpolation is used on those numbers (in other words, only the order is taken into account, not the actual values).

min alpha

int

0

input

The minimum alpha value (between 0 and 255) to map on graph elements colors

max alpha

int

255

input

The maximum alpha value (between 0 and 255) to map on graph elements colors

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Alpha Mapping', graph)

# set any input parameter value if needed
# params['input property'] = ...
# params['target'] = ...
# params['type'] = ...
# params['min alpha'] = ...
# params['max alpha'] = ...

# either create or get a color property from the graph to store the result of the algorithm
resultColor = graph.getColorProperty('resultColor')
success = graph.applyColorAlgorithm('Alpha Mapping', resultColor, params)

# or store the result of the algorithm in the default Tulip color property named 'viewColor'
success = graph.applyColorAlgorithm('Alpha Mapping', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Color Mapping

Description

Colorizes the nodes or edges of a graph according to the values of a given property.

Parameters

name

type

default

direction

description

type

tlp.StringCollection

linear

Values:
linear
uniform
enumerated
logarithmic

input

If linear, logarithmic or uniform, the input property must be a numeric property.

  • linear : the minimum value is mapped to one end of the color scale, the maximum value is mapped to the other end, and a linear interpolation is used between both to compute the associated color.
  • logarithmic : graph elements values are first mapped in the [1, +inf[ range. Then the log of each mapped value is computed and used to compute the associated color of the graph element trough a linear interpolation between 0 and the log of the mapped maximum value of graph elements.
  • uniform : this is the same as logarithmic except for the interpolation: the values are sorted, numbered, and a linear interpolation is used on those numbers (in other words, only the order is taken into account, not the actual values).
  • enumerated : the input property can be of any type. Each possible value is mapped manually to a distinct color without any specific order.

input property

tlp.PropertyInterface

viewMetric

input

This property is used to get the values affected to graph items.

target

tlp.StringCollection

nodes

Values:
nodes
edges

input

Whether colors are computed for nodes or for edges.

color scale

tlp.ColorScale

input

The color scale used to transform a node/edge property value into a color.

override minimum value

bool

False

input

If true override the minimum value of the input property to keep coloring consistent across datasets.

minimum value

float

input

That value will be used to override the minimum one of the input property.

override maximum value

bool

False

input

If true override the maximum value of the input property to keep coloring consistent across datasets.

maximum value

float

input

That value will be used to override the maximum one of the input property.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Color Mapping', graph)

# set any input parameter value if needed
# params['type'] = ...
# params['input property'] = ...
# params['target'] = ...
# params['color scale'] = ...
# params['override minimum value'] = ...
# params['minimum value'] = ...
# params['override maximum value'] = ...
# params['maximum value'] = ...

# either create or get a color property from the graph to store the result of the algorithm
resultColor = graph.getColorProperty('resultColor')
success = graph.applyColorAlgorithm('Color Mapping', resultColor, params)

# or store the result of the algorithm in the default Tulip color property named 'viewColor'
success = graph.applyColorAlgorithm('Color Mapping', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Export

To call these plugins, you must use the tlp.exportGraph() function.

CSV Export

Description

Supported extensions: csv

Exports the values of tulip graph properties associated to graph elements in a CSV file.

Parameters

name

type

default

direction

description

Type of elements

tlp.StringCollection

nodes

input

This parameter enables to choose the type of graph elements to export

Export selection

bool

False

input

This parameter indicates if only selected elements have to be exported

Export selection property

tlp.BooleanProperty

viewSelection

input

This parameters enables to choose the property used for the selection

Export id

bool

False

input

This parameter indicates if the id of graph elements has to be exported

Exported properties

PropertiesCollection

the user defined properties

input

This parameter indicates the properties to be exported. Default indicates only the user defined properties

Field separator

tlp.StringCollection

input

This parameter indicates the field separator (sequence of one or more characters used to specify the boundary between two consecutive fields).

Custom separator

str

;

input

This parameter allows to indicate a custom field separator. The ‘Field separator’ parameter must be set to ‘Custom’

String delimiter

tlp.StringCollection

input

This parameter indicates the text delimiter (sequence of one or more characters used to specify the boundary of value of type text).

Decimal mark

tlp.StringCollection

.

input

This parameter indicates the character used to separate the integer part from the fractional part of a number written in decimal form.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('CSV Export', graph)

# set any input parameter value if needed
# params['Type of elements'] = ...
# params['Export selection'] = ...
# params['Export selection property'] = ...
# params['Export id'] = ...
# params['Exported properties'] = ...
# params['Field separator'] = ...
# params['Custom separator'] = ...
# params['String delimiter'] = ...
# params['Decimal mark'] = ...

outputFile = '<path to a file>'
success = tlp.exportGraph('CSV Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GML Export

Description

Supported extensions: gml

Exports a Tulip graph in a file using the GML format (used by Graphlet).
See: <a href=”http://www.infosun.fim.uni-passau.de/Graphlet/GML/”>http://www.infosun.fim.uni-passau.de/Graphlet/GML/</a> for details.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GML Export', graph)

outputFile = '<path to a file>'
success = tlp.exportGraph('GML Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

JSON Export

Description

Supported extensions: json

Exports a graph in a file using the Tulip JSON format.

Parameters

name

type

default

direction

description

Beautify JSON string

bool

False

input

If true, generate a JSON string with indentation and line breaks.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('JSON Export', graph)

# set any input parameter value if needed
# params['Beautify JSON string'] = ...

outputFile = '<path to a file>'
success = tlp.exportGraph('JSON Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

SVG Export

Description

Supported extensions: svg, svgz (compressed svg).

Exports a graph visualization in a SVG formatted file.

Parameters

name

type

default

direction

description

Edge color interpolation

bool

False

input

Indicates if edge color interpolation has to be used.

Edge size interpolation

bool

True

input

Indicates if edge size interpolation has to be used.

Edge extremities

bool

False

input

Indicates if edge extremities have to be exported.

Background color

tlp.Color

(255,255,255,255)

input

Specifies the background color.

No background

bool

False

input

Specifies if a background is needed.

Makes SVG output human readable

bool

True

input

Adds line-breaks and indentation to empty sections between elements (ignorable whitespace). The main purpose of this parameter is to split the data into several lines, and to increase readability for a human reader. Be careful, this adds a large amount of data to the output file.

Export node labels

bool

True

input

Specifies if node labels have to be exported.

Export edge labels

bool

False

input

Specifies if edge labels have to be exported.

Export metanode labels

bool

False

input

Specifies if node and edge labels inside metanodes have to be exported.

Use Web Open Font Format v2

bool

False

input

Uses Web Open Font Format version 2 (woff2) to reduce generated file length. This format is supported in almost all recent Internet browsers.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('SVG Export', graph)

# set any input parameter value if needed
# params['Edge color interpolation'] = ...
# params['Edge size interpolation'] = ...
# params['Edge extremities'] = ...
# params['Background color'] = ...
# params['No background'] = ...
# params['Makes SVG output human readable'] = ...
# params['Export node labels'] = ...
# params['Export edge labels'] = ...
# params['Export metanode labels'] = ...
# params['Use Web Open Font Format v2'] = ...

outputFile = '<path to a file>'
success = tlp.exportGraph('SVG Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

TLP Export

Description

Supported extensions: tlp, tlpz (compressed), tlp.gz (compressed)

Exports a graph in a file using the TLP format (Tulip Software Graph Format).
See http://tulip.labri.fr->Framework->TLP File Format for more details.

Parameters

name

type

default

direction

description

name

str

input

Name of the graph being exported.

author

str

input

Authors

text::comments

str

This file was generated by Tulip.

input

Description of the graph.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('TLP Export', graph)

# set any input parameter value if needed
# params['name'] = ...
# params['author'] = ...
# params['text::comments'] = ...

outputFile = '<path to a file>'
success = tlp.exportGraph('TLP Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

TLPB Export

Description

Supported extensions: tlpb, tlpbz (compressed), tlpb.gz (compressed)

Exports a graph in a file using the Tulip binary format.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('TLPB Export', graph)

outputFile = '<path to a file>'
success = tlp.exportGraph('TLPB Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Import

To call these plugins, you must use the tlp.importGraph() function.

Adjacency Matrix

Description

Imports a graph from a file coding an adjacency matrix.
File format:
The input format of this plugin is an ascii file where each line represents a row of the matrix.In each row, cells must be separated by a space.
Let M(i,j) be a cell of the matrix :
- if i==j we define the value of a node.
- if i!=j we define a directed edge between node[i] and node[j]
If M(i,j) is real value (0, .0, -1, -1.0), it is stored in the viewMetric property of the graph.
If M(i,j) is a string, it is stored in the viewLabel property of the graph.
Use & to set the viewMetric and viewLabel properties of a node or edge in the same time.
If M(i,j) == @ an edge will be created without value
If M(i,j) == # no edge will be created between node[i] and node[j]
EXAMPLE 1 :
A
# B
# # C
Defines a graph with 3 nodes (with labels A B C) and without edge.
EXAMPLE 2 :
A
@ B
@ @ C
Defines a simple complete graph with 3 nodes (with labels A B C) and no label (or value) on its edges
EXAMPLE 3 :
A # E & 5
@ B
# @ C
Defines a graph with 3 nodes and 3 edges, the edge between A and C is named E and has the value 5

Parameters

name

type

default

direction

description

filename

file pathname

input

This parameter defines the pathname of the file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Adjacency Matrix')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('Adjacency Matrix', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Attract And Introduce Model

Description

Randomly generates a graph using the Attract and Introduce Model described in
J. H. Fowlera, C. T. Dawesa, N. A. Christakisb.
Model of genetic variation in human social networks.
PNAS 106 (6): 1720-1724, 2009.

Parameters

name

type

default

direction

description

nodes

int

750

input

This parameter defines the amount of nodes used to build the graph.

edges

int

3150

input

This parameter defines the amount of edges used to build the graph.

alpha

float

0.9

input

This parameter defines the alpha parameter between [0,1]. This one is a percentage and describes the distribution of attractiveness; the model suggests about 1 - alpha of the individuals have very low attractiveness whereas the remaining alpha are approximately evenly distributed between low, medium, and high attractiveness

beta

float

0.3

input

This parameter defines the beta parameter between [0,1]. This parameter indicates the probability a person will have the desire to introduce someone.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Attract And Introduce Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...
# params['alpha'] = ...
# params['beta'] = ...

graph = tlp.importGraph('Attract And Introduce Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

BibTeX

Description

Supported extensions: bib

Import a co-authorship graph from a BibTeX formatted file.

Parameters

name

type

default

direction

description

filename

file pathname

input

This parameter indicates the pathname of the file(.bib) to import.

Nodes to import

tlp.StringCollection

Authors

input

The type of nodes to create: Authors (Create nodes for authors only, publications are represented as edges between authors)
Authors and Publications (Create nodes for both authors and publications and edges are created between the publications and their authors)
Publications (Create nodes for publications only)

One edge per publication

bool

True

input

When only Authors are imported, this parameter indicates:

  • if set to true , that a new edge will be created each time two authors are involved in the same publication.
  • if set to false , that only one edge will be created between two authors involved in at least one publication.
    Then the # publications property edge value will indicate the number of publications they wrote in common.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('BibTeX')

# set any input parameter value if needed
# params['filename'] = ...
# params['Nodes to import'] = ...
# params['One edge per publication'] = ...

graph = tlp.importGraph('BibTeX', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Bollobas et al. Model

Description

Randomly generates a scale-free graph using the model described in
B. Bollobas, O.M Riordan, J. Spencer and G. Tusnady.
The Degree Sequence of a Scale-Free Random Graph Process.
RSA: Random Structures & Algorithms, 18, 279 (2001)

Parameters

name

type

default

direction

description

nodes

int

2000

input

This parameter defines the amount of nodes used to build the scale-free graph.

minimum degree

int

4

input

Minimum degree.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Bollobas et al. Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['minimum degree'] = ...

graph = tlp.importGraph('Bollobas et al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Bu Wang Zhou Model

Description

Randomly generates a scale-free graph unsing the model described in
Shouliang Bu, Bing-Hong Wang, Tao Zhou.
Gaining scale-free and high clustering complex networks.
Physica A, 374, 864–868, 2007.

Parameters

name

type

default

direction

description

nodes

int

200

input

Number of nodes.

types of nodes

int

3

input

Number of node types.

m

int

2

input

Number of edges added for each new node.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Bu Wang Zhou Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['types of nodes'] = ...
# params['m'] = ...

graph = tlp.importGraph('Bu Wang Zhou Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

CMake dependencies graph

Description

Import the targets dependencies graph of a CMake project

Parameters

name

type

default

direction

description

CMake project source dir

directory pathname

input

The root source directory of the CMake project

CMake executable

file pathname

cmake

input

Optional parameter in order to provide the path to the CMake executable. By default CMake executable path is assumed to be in your PATH environment variable

CMake parameters

str

input

Optional parameter for providing some parameters to CMake in order to correctly configure the project

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('CMake dependencies graph')

# set any input parameter value if needed
# params['CMake project source dir'] = ...
# params['CMake executable'] = ...
# params['CMake parameters'] = ...

graph = tlp.importGraph('CMake dependencies graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Catanzaro and al. Model

Description

Randomly generates a graph using the model described in
Michele Catanzaro, Guido Caldarelli, and Luciano Pietronero.
Assortative model for social networks.
Physical Review E (Statistical, Nonlinear, and Soft Matter Physics), 70(3), (2004).

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

m

int

5

input

Number of nodes added at each time step.

p

float

0.5

input

p defines the probality a new node is wired to an existing one

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Catanzaro and al. Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['p'] = ...

graph = tlp.importGraph('Catanzaro and al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Complete General Graph

Description

Imports a new complete graph.

Parameters

name

type

default

direction

description

nodes

int

5

input

Number of nodes in the final graph.

directed

bool

False

input

If false, the generated graph is undirected. If true, two edges are created between each pair of nodes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Complete General Graph')

# set any input parameter value if needed
# params['nodes'] = ...
# params['directed'] = ...

graph = tlp.importGraph('Complete General Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Complete Tree

Description

Imports a new complete tree.

Parameters

name

type

default

direction

description

depth

int

5

input

Depth of the tree.

degree

int

2

input

The tree’s degree.

tree layout

bool

False

input

If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Complete Tree')

# set any input parameter value if needed
# params['depth'] = ...
# params['degree'] = ...
# params['tree layout'] = ...

graph = tlp.importGraph('Complete Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Empty graph

Description

A no-op plugin to import empty graphs

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Empty graph')

graph = tlp.importGraph('Empty graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Erdős-Rényi Random Graph

Description

Import a randomly generated graph following the Erdős-Rényi model. Given a positive integer n and a probability value in [0,1], define the graph G(n,p) to be the undirected graph on n vertices whose edges are chosen as follows: For all pairs of vertices v,w there is an edge (v,w) with probability p.

Parameters

name

type

default

direction

description

nodes

int

50

input

Number of nodes in the final graph.

probability

float

0.5

input

Probability of having an edge between each pair of vertices in the graph.

self loop

bool

False

input

Generate self loops (an edge with source and target on the same node) with the same probability

directed

bool

False

input

Generate a directed graph (arcs u->v and v->u have the same probability)

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Erdős-Rényi Random Graph')

# set any input parameter value if needed
# params['nodes'] = ...
# params['probability'] = ...
# params['self loop'] = ...
# params['directed'] = ...

graph = tlp.importGraph('Erdős-Rényi Random Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

File System Directory

Description

Imports a tree representation of a file system directory.

Parameters

name

type

default

direction

description

directory

directory pathname

input

The directory to scan recursively.

include hidden files

bool

True

input

If true, also include hidden files.

follow symlinks

bool

True

input

If true, follow symlinks on Unix (including Mac OS X) or .lnk file on Windows.

icons

bool

True

input

If true, set icons as node shapes according to file mime types.

tree layout

bool

True

input

If true, apply the ‘Bubble Tree’ layout algorithm on the imported graph.

directory color

tlp.Color

(255, 255, 127, 255)

input

This parameter indicates the color used to display directories.

other color

tlp.Color

(85, 170, 255, 255)

input

This parameter indicates the color used to display other files.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('File System Directory')

# set any input parameter value if needed
# params['directory'] = ...
# params['include hidden files'] = ...
# params['follow symlinks'] = ...
# params['icons'] = ...
# params['tree layout'] = ...
# params['directory color'] = ...
# params['other color'] = ...

graph = tlp.importGraph('File System Directory', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Fu and Liao Model

Description

Randomly generates a scale-free graph using
Peihua Fu and Kun Liao.
An evolving scale-free network with large clustering coefficient.
In ICARCV, pp. 1-4. IEEE, (2006).

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

m

int

5

input

Number of nodes added at each time step.

delta

float

0.5

input

Delta coefficient must belong to [0, 1]

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Fu and Liao Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['delta'] = ...

graph = tlp.importGraph('Fu and Liao Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GEXF

Description

Supported extensions: gexf

Imports a new graph from a file in the GEXF input format
as it is described in the XML Schema 1.2 draft
(<a href=”http://gexf.net/format/schema.html”>http://gexf.net/format/schema.html</a>).

Warning: dynamic mode is not supported.

Parameters

name

type

default

direction

description

filename

file pathname

input

This parameter defines the pathname of the GEXF file to import.

Curved edges

bool

False

input

Indicates if Bézier curves should be used to draw the edges.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GEXF')

# set any input parameter value if needed
# params['filename'] = ...
# params['Curved edges'] = ...

graph = tlp.importGraph('GEXF', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GML

Description

Supported extension: gml

Imports a new graph from a file (.gml) in the GML input format (used by Graphlet).<p/>See <a href=”http://www.infosun.fim.uni-passau.de/Graphlet/GML/gml-tr.html”>http://www.infosun.fmi.uni-passau.de/Graphlet/GML/gml-tr.html</a> for details.

Parameters

name

type

default

direction

description

filename

file pathname

input

The pathname of the GML file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GML')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('GML', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GraphML

Description

Supported extension: graphml

Imports a graph from a file in the GraphML format (<a href=”http://graphml.graphdrawing.org/”>http://graphml.graphdrawing.org</a>). GraphML is a comprehensive and easy-to-use file format for graphs. It consists of a language core to describe the structural properties of a graph and a flexible extension mechanism to add application-specific data.

Parameters

name

type

default

direction

description

filename

file pathname

input

The GraphML file to import

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GraphML')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('GraphML', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Grid

Description

Imports a new grid structured graph.

Parameters

name

type

default

direction

description

width

int

10

input

Grid node width.

height

int

10

input

Grid node height.

connectivity

tlp.StringCollection

4

Values:
4
6
8

input

Connectivity number of each node.

oppositeNodesConnected

bool

False

input

If true, opposite nodes on each side of the grid are connected. In a 4 connectivity the resulting object is a torus.

spacing

float

1.0

input

Spacing between nodes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Grid')

# set any input parameter value if needed
# params['width'] = ...
# params['height'] = ...
# params['connectivity'] = ...
# params['oppositeNodesConnected'] = ...
# params['spacing'] = ...

graph = tlp.importGraph('Grid', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Grid Approximation

Description

Imports a new grid approximation graph.

Parameters

name

type

default

direction

description

nodes

int

200

input

Number of nodes in the final graph.

degree

int

10

input

Average degree of the nodes in the final graph.

long edge

bool

False

input

If true, long distance edges are added in the grid approximation.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Grid Approximation')

# set any input parameter value if needed
# params['nodes'] = ...
# params['degree'] = ...
# params['long edge'] = ...

graph = tlp.importGraph('Grid Approximation', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Guillaume Latapy Model

Description

Randomly generates a small word graph using the model described in
J.-L. Guillaume and M. Latapy.
Bipartite graphs as models of complex networks.
In Workshop on Combinatorial and Algorithmic Aspects of Networking (CAAN), LNCS, volume 1, 2004.

Parameters

name

type

default

direction

description

nodes

int

200

input

This parameter defines the amount of nodes used to build the small-world graph.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Guillaume Latapy Model')

# set any input parameter value if needed
# params['nodes'] = ...

graph = tlp.importGraph('Guillaume Latapy Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Holme and Kim Model

Description

Randomly generates a scale-free graph using the model described in
Petter Holme and Beom Jun Kim.
Growing scale-free networks with tunable clustering.
Physical Review E, 65, 026107, (2002).

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

m

int

5

input

Number of edges added at each time step.

p

float

0.5

input

Probability of adding a triangle after adding a random edge.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Holme and Kim Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['p'] = ...

graph = tlp.importGraph('Holme and Kim Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

JSON Import

Description

Supported extensions: json

Imports a graph recorded in a file using the Tulip JSON format.

Parameters

name

type

default

direction

description

filename

file pathname

input

The pathname of the TLP JSON file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('JSON Import')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('JSON Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Klemm Eguiluz Model

Description

Randomly generates a small world graph using the model described in
Konstantin Klemm and Victor M. Eguiluz.
Growing Scale-Free Networks with Small World Behavior.
Physical Review E, 65, 057102,(2002).

Parameters

name

type

default

direction

description

nodes

int

200

input

Number of nodes.

m

int

10

input

Number of activated nodes.

mu

float

0.5

input

Probability to connect a node to a random other node
instead of an activated node.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Klemm Eguiluz Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['mu'] = ...

graph = tlp.importGraph('Klemm Eguiluz Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Liu et al. model

Description

Randomly generates a small world graph using the model described in
J.-G. Liu, Y.-Z. Dang, and Z. tuo Wang.
Multistage random growing small-world networks with power-law degree distribution.
Chinese Phys. Lett., 23(3):746, Oct. 31 2005.

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Liu et al. model')

# set any input parameter value if needed
# params['nodes'] = ...

graph = tlp.importGraph('Liu et al. model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Npm package dependencies graph

Description

Import the packages dependencies graph from a npm package. Be sure to have called ‘npm install’ in the package directory first in order to get the complete dependencies graph.

Parameters

name

type

default

direction

description

npm package dir

directory pathname

input

The root directory of the npm package

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Npm package dependencies graph')

# set any input parameter value if needed
# params['npm package dir'] = ...

graph = tlp.importGraph('Npm package dependencies graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Pajek

Description

Supported extensions: net, paj

Imports a new graph from a file (.net) in Pajek NET format
as it is described in the Pajek manual (<a href=”http://mrvar.fdv.uni-lj.si/pajek/pajekman.pdf”>http://mrvar.fdv.uni-lj.si/pajek/pajekman.pdf</a>)

Warning: the description of the edges with Matrix (adjacency lists)is not yet supported.

Parameters

name

type

default

direction

description

filename

file pathname

input

This parameter indicates the pathname of the Pajek file (.net or .paj) to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Pajek')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('Pajek', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Planar Graph

Description

Imports a new randomly generated planar graph.

Parameters

name

type

default

direction

description

nodes

int

30

input

Number of nodes in the final graph.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Planar Graph')

# set any input parameter value if needed
# params['nodes'] = ...

graph = tlp.importGraph('Planar Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Random General Graph

Description

Imports a new randomly generated graph.

Parameters

name

type

default

direction

description

nodes

int

500

input

Number of nodes in the final graph.

edges

int

1000

input

Number of edges in the final graph.

directed

bool

False

input

If True, the graph may contain edges a->b and b->a.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random General Graph')

# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...
# params['directed'] = ...

graph = tlp.importGraph('Random General Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Random General Tree

Description

Imports a new randomly generated tree.

Parameters

name

type

default

direction

description

Minimum size

int

10

input

Minimal number of nodes in the tree.

Maximum size

int

100

input

Maximal number of nodes in the tree.

Maximal node’s degree

int

5

input

Maximal degree of the nodes.

tree layout

bool

False

input

If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random General Tree')

# set any input parameter value if needed
# params['Minimum size'] = ...
# params['Maximum size'] = ...
# params['Maximal node's degree'] = ...
# params['tree layout'] = ...

graph = tlp.importGraph('Random General Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Random Simple Graph

Description

Imports a new randomly generated simple graph.

Parameters

name

type

default

direction

description

nodes

int

500

input

Number of nodes in the final graph.

edges

int

1000

input

Number of edges in the final graph.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random Simple Graph')

# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...

graph = tlp.importGraph('Random Simple Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

TLP Import

Description

Supported extensions: tlp, tlpz (compressed), tlp.gz (compressed)

Imports a graph recorded in a file using the TLP format (Tulip Software Graph Format).
See <a href=”http://tulip.labri.fr/TulipDrupal/?q=tlp-file-format”>http://tulip.labri.fr->Framework->TLP File Format</a> for description.
Note: When using the Tulip graphical user interface,
choosing File->Import->TLP menu item is the same as using File->Open menu item.

Parameters

name

type

default

direction

description

filename

file pathname

input

The pathname of the TLP file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('TLP Import')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('TLP Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

TLPB Import

Description

Supported extensions: tlpb, tlpb.gz (compressed), tlpbz (compressed)

Imports a graph recorded in a file using the Tulip binary format.

Parameters

name

type

default

direction

description

filename

file pathname

input

The pathname of the TLPB file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('TLPB Import')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('TLPB Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

UCINET

Description

Supported extensions: txt

Imports a new graph from a text file in UCINET DL input format
as it is described in the UCINET reference manual
(see <a href=”http://www.analytictech.com/ucinet/documentation/reference.rtf”>http://www.analytictech.com/ucinet/documentation/reference.rtf</a>)

Parameters

name

type

default

direction

description

filename

file pathname

input

This parameter indicates the pathname of the file in UCINET DL format to import.

Default metric

str

weight

input

This parameter indicates the name of the default metric.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('UCINET')

# set any input parameter value if needed
# params['filename'] = ...
# params['Default metric'] = ...

graph = tlp.importGraph('UCINET', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Uniform Random Binary Tree

Description

Imports a new randomly generated uniform binary tree.

Parameters

name

type

default

direction

description

Minimum size

int

50

input

Minimal number of nodes in the tree.

Maximum size

int

60

input

Maximal number of nodes in the tree.

tree layout

bool

False

input

If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Uniform Random Binary Tree')

# set any input parameter value if needed
# params['Minimum size'] = ...
# params['Maximum size'] = ...
# params['tree layout'] = ...

graph = tlp.importGraph('Uniform Random Binary Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Wang and Rong Model

Description

Randomly generates a small-world graph using the model described in
Jianwei Wang and Lili Rong.
Evolving small-world networks based on the modified BA model.
International Conference on Computer Science and Information Technology, 0, 143-146, (2008).

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

m0

int

5

input

Number of nodes in the initial ring.

m

int

5

input

Number of nodes added at each time step.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Wang and Rong Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['m0'] = ...
# params['m'] = ...

graph = tlp.importGraph('Wang and Rong Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Wang et al. Model

Description

Randomly generates a small world graph using the model described in
L.Wang, F. Du, H. P. Dai, and Y. X. Sun.
Random pseudofractal scale-free networks with small-world effect.
The European Physical Journal B - Condensed Matter and Complex Systems, 53, 361-366, (2006).

Parameters

name

type

default

direction

description

nodes

int

300

input

Number of nodes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Wang et al. Model')

# set any input parameter value if needed
# params['nodes'] = ...

graph = tlp.importGraph('Wang et al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Watts Strogatz Model

Description

Randomly generates a small world graph using the model described in
D. J. Watts and S. H. Strogatz.
Collective dynamics of small-world networks.
Nature 393, 440 (1998).

Parameters

name

type

default

direction

description

nodes

int

200

input

This parameter defines the amount of nodes used to build the scale-free graph.

k

int

3

input

Number of edges added to each node in the initial ring lattice. Be careful that #nodes > k > ln(#nodes)

p

float

0.02

input

Probability in [0,1] to rewire an edge.

original model

bool

False

input

Use the original model: k describes the degree of each vertex (k > 1 and even).

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Watts Strogatz Model')

# set any input parameter value if needed
# params['nodes'] = ...
# params['k'] = ...
# params['p'] = ...
# params['original model'] = ...

graph = tlp.importGraph('Watts Strogatz Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Web Site

Description

Imports a new graph from Web site structure (one node per page).

Parameters

name

type

default

direction

description

server

str

www.labri.fr

input

This parameter defines the web server that you want to inspect. No need for http:// at the beginning; http protocol is always assumed. No need for / at the end.

web page

str

input

This parameter defines the first web page to visit. No need for / at the beginning.

max size

int

1000

input

This parameter defines the maximum number of nodes (different pages) allowed in the extracted graph.

non http links

bool

False

input

This parameter indicates if non http links (https, ftp, mailto…) have to be extracted.

other server

bool

False

input

This parameter indicates if links or redirection to other server pages have to be followed.

compute layout

bool

True

input

This parameter indicates if a layout of the extracted graph has to be computed.

page color

tlp.Color

(240, 0, 120, 128)

input

This parameter indicates the color used to display nodes.

link color

tlp.Color

(96,96,191,128)

input

This parameter indicates the color used to display links.

redirection color

tlp.Color

(191,175,96,128)

input

This parameter indicates the color used to display redirections.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Web Site')

# set any input parameter value if needed
# params['server'] = ...
# params['web page'] = ...
# params['max size'] = ...
# params['non http links'] = ...
# params['other server'] = ...
# params['compute layout'] = ...
# params['page color'] = ...
# params['link color'] = ...
# params['redirection color'] = ...

graph = tlp.importGraph('Web Site', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

graphviz

Description

Supported extensions: dot

Imports a new graph from a file in the dot input format.

(see <a href=”https://www.graphviz.org/doc/info/lang.html”>https://www.graphviz.org/doc/info/lang.html</a>)

Parameters

name

type

default

direction

description

filename

file pathname

input

The dot file to import.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('graphviz')

# set any input parameter value if needed
# params['filename'] = ...

graph = tlp.importGraph('graphviz', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Labeling

To call these plugins, you must use the tlp.Graph.applyStringAlgorithm() method. See also Calling a property algorithm on a graph for more details.

To labels

Description

Maps the labels of the graph elements onto the values of a given property.

Parameters

name

type

default

direction

description

input

tlp.PropertyInterface

viewMetric

input

Property to stringify values on labels.

selection

tlp.BooleanProperty

input

Set of elements for which to set the labels.

nodes

bool

True

input

Sets labels on nodes.

edges

bool

True

input

Set labels on edges.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('To labels', graph)

# set any input parameter value if needed
# params['input'] = ...
# params['selection'] = ...
# params['nodes'] = ...
# params['edges'] = ...

# either create or get a string property from the graph to store the result of the algorithm
resultString = graph.getStringProperty('resultString')
success = graph.applyStringAlgorithm('To labels', resultString, params)

# or store the result of the algorithm in the default Tulip string property named 'viewLabel'
success = graph.applyStringAlgorithm('To labels', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Layout

To call these plugins, you must use the tlp.Graph.applyLayoutAlgorithm() method. See also Calling a property algorithm on a graph for more details.

3-Connected (Tutte)

Description

Implements the Tutte layout for 3-Connected graph algorithm first published as:
How to Draw a Graph , W.T. Tutte, Proc. London Math. Soc. pages 743–768 (1963).

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('3-Connected (Tutte)', graph)

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('3-Connected (Tutte)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('3-Connected (Tutte)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Balloon (OGDF)

Description

Computes a radial (balloon) layout based on a spanning tree.
The algorithm is partially based on the papers:
On Balloon Drawings of Rooted Trees by Lin and Yen
Interacting with Huge Hierarchies: Beyond Cone Trees by Carriere and Kazman.

Parameters

name

type

default

direction

description

Even angles

bool

False

input

Subtrees may be assigned even angles or angles depending on their size.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Balloon (OGDF)', graph)

# set any input parameter value if needed
# params['Even angles'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Balloon (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Balloon (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Bertault (OGDF)

Description

Computes a force directed layout (Bertault Layout) for preserving the planar embedding in the graph.

Parameters

name

type

default

direction

description

impred

bool

False

input

Sets impred option.

iterno

int

20

input

The number of iterations. If <=0, the number of iterations will be set as 10 times the number of nodes.

reqlength

float

0.0

input

The required edge length.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bertault (OGDF)', graph)

# set any input parameter value if needed
# params['impred'] = ...
# params['iterno'] = ...
# params['reqlength'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bertault (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bertault (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Bubble Pack

Description

Stable

Parameters

name

type

default

direction

description

complexity

bool

True

input

This parameter enables to choose the complexity of the algorithm, true = o(nlog(n)) / false = o(n)

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node’s sizes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bubble Pack', graph)

# set any input parameter value if needed
# params['complexity'] = ...
# params['node size'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bubble Pack', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bubble Pack', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Bubble Tree

Description

Implement the bubble tree drawing algorithm first published as:
Bubble Tree Drawing Algorithm , S. Grivet, D. Auber, J-P Domenger and Guy Melancon, Computer Vision and Graphics. Computational Imaging and Vision, vol 32, 2006. Springer, Dordrecht, doi: <a href=”https://doi.org/10.1007/1-4020-4179-9_91”>10.1007/1-4020-4179-9_91</a>

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

complexity

bool

True

input

This parameter enables to choose the complexity of the algorithm.If true, the complexity is O(n.log(n)), if false it is O(n).

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bubble Tree', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['complexity'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bubble Tree', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bubble Tree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Circular

Description

Implements a circular layout that takes node size into account.
It manages size of nodes and use a standard dfs for ordering nodes or search the maximum length cycle.

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

search cycle

bool

False

input

If true, search first for the maximum length cycle (be careful, this problem is NP-Complete). If false, nodes are ordered using a depth first search.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Circular', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['search cycle'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Circular', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Circular', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Circular (OGDF)

Description

Implements a circular layout based on the following publication:Ugur Dogrusöz, Brendan Madden, Patrick Madden: Circular Layout in the Graph Layout Toolkit.Proc. Graph Drawing 1996, LNCS 1190, pp. 92-100, 1997.

Parameters

name

type

default

direction

description

minDistCircle

float

20

input

The minimal distance between nodes on a circle.

minDistLevel

float

20

input

The minimal distance between father and child circle.

minDistSibling

float

10

input

The minimal distance between circles on same level.

minDistCC

float

20

input

The minimal distance between connected components.

pageRatio

float

1

input

The page ratio used for packing connected components.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Circular (OGDF)', graph)

# set any input parameter value if needed
# params['minDistCircle'] = ...
# params['minDistLevel'] = ...
# params['minDistSibling'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Circular (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Circular (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Cone Tree

Description

Implements an extension of the Cone tree layout algorithm first published as:
Interacting with Huge Hierarchies: Beyond Cone Trees , A. FJ. Carriere and R. Kazman, InfoViz’95, IEEE Symposium on Information Visualization pages 74–78 (1995),doi: <a href=”https://dx.doi.org/10.1109/INFVIS.1995.528689”>10.1109/INFVIS.1995.528689</a>

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

This parameter enables to choose the orientation of the drawing.

space between levels

float

1.0

input

This parameter enables to add extra spacing between the different levels of the tree

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Cone Tree', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['space between levels'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Cone Tree', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Cone Tree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Connected Component Packing

Description

Implements a layout packing of the connected components of a graph. It builds a layout of the graph connected components so that they do not overlap and minimizes the lost space (packing).

Parameters

name

type

default

direction

description

coordinates

tlp.LayoutProperty

viewLayout

input

Input layout of nodes and edges.

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

rotation

tlp.DoubleProperty

viewRotation

input

Input rotation of nodes around the z-axis.

complexity

tlp.StringCollection

auto

Values:
auto
n5
n4logn
n4
n3logn
n3
n2logn
n2
nlogn
n

input

Complexity of the algorithm.
n is the number of connected components in the graph.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component Packing', graph)

# set any input parameter value if needed
# params['coordinates'] = ...
# params['node size'] = ...
# params['rotation'] = ...
# params['complexity'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Connected Component Packing', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Connected Component Packing', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Connected Component Packing (Polyomino)

Description

Implements the connected component packing algorithm published as:
Disconnected Graph Layout and the Polyomino Packing Approach , Freivalds Karlis, Dogrusoz Ugur and Kikusts Paulis, 9th International Symposium on Graph Drawing 2001,LNCS Vol. 2265 (2002), pp 378-391, doi: <a href=”https://doi.org/10.1007/3-540-45848-4_30”>https://doi.org/10.1007/3-540-45848-4_30</a>

Parameters

name

type

default

direction

description

coordinates

tlp.LayoutProperty

viewLayout

input

Input layout of nodes and edges.

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

rotation

tlp.DoubleProperty

viewRotation

input

Input rotation of nodes on z-axis

margin

int

1

input

The minimum margin between each pair of nodes in the resulting packed layout.

increment

int

1

input

The polyomino packing tries to find a place where the next polyomino will fit by following a square.If there is no place where the polyomino fits, the square gets bigger and every place gets tried again.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component Packing (Polyomino)', graph)

# set any input parameter value if needed
# params['coordinates'] = ...
# params['node size'] = ...
# params['rotation'] = ...
# params['margin'] = ...
# params['increment'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Connected Component Packing (Polyomino)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Connected Component Packing (Polyomino)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Davidson Harel (OGDF)

Description

Implements the Davidson-Harel layout algorithm which uses simulated annealing to find a layout of minimal energy.
Due to this approach, the algorithm can only handle graphs of rather limited size.
It is based on the following publication:
Drawing Graphs Nicely Using Simulated Annealing , Ron Davidson, David Harel, ACM Transactions on Graphics 15(4), pp. 301-331, 1996.

Parameters

name

type

default

direction

description

Settings

tlp.StringCollection

Standard

Values:
Standard
Repulse
Planar

input

Fixes the cost values to special configurations.

Speed

tlp.StringCollection

Fast

Values:
Fast
Medium
HQ

input

More convenient way of setting the speed of the algorithm. Influences number of iterations per temperature step, starting temperature, and cooling factor.

preferredEdgeLength

float

0.0

input

The preferred edge length.

preferredEdgeLengthMultiplier

float

2.0

input

The preferred edge length multiplier for attraction.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Davidson Harel (OGDF)', graph)

# set any input parameter value if needed
# params['Settings'] = ...
# params['Speed'] = ...
# params['preferredEdgeLength'] = ...
# params['preferredEdgeLengthMultiplier'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Davidson Harel (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Davidson Harel (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Dendrogram

Description

This is an implementation of a dendrogram, an extended implementation of a Bio representation which includes variable orientation and variable node sizelayout.

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

up to down

Values:
up to down
down to up
right to left
left to right

input

Choose a desired orientation.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dendrogram', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Dendrogram', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Dendrogram', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Dominance (OGDF)

Description

Implements a simple upward drawing algorithm based on dominance drawings of st-digraphs.

Parameters

name

type

default

direction

description

minimum grid distance

int

1

input

The minimum grid distance.

transpose

bool

False

input

If true, transpose the layout vertically.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dominance (OGDF)', graph)

# set any input parameter value if needed
# params['minimum grid distance'] = ...
# params['transpose'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Dominance (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Dominance (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

FM^3 (OGDF)

Description

Implements the FM³ layout algorithm by Hachul and Jünger. It is a multilevel, force-directed layout algorithm that can be applied to very large graphs.

Parameters

name

type

default

direction

description

Edge Length Property

tlp.NumericProperty

viewMetric

input

A numeric property containing unit edge length to use.

Node Size

tlp.SizeProperty

viewSize

input

The node sizes.

Unit edge length

float

10.0

input

The unit edge length.

New initial placement

bool

True

input

Indicates the initial placement before running algorithm.

Fixed iterations

int

30

input

The fixed number of iterations for the stop criterion.

Threshold

float

0.01

input

The threshold for the stop criterion.

Page Format

tlp.StringCollection

Square

Values:
Portrait (A4 portrait page)
Landscape (A4 landscape page)
Square (Square format)

input

Possible page formats.

Quality vs Speed

tlp.StringCollection

BeautifulAndFast

Values:
GorgeousAndEfficient (Best quality)
BeautifulAndFast (Medium quality and speed)
NiceAndIncredibleSpeed (Best speed

input

Trade-off between run-time and quality.

Edge Length Measurement

tlp.StringCollection

BoundingCircle

Values:
Midpoint (Measure from center point of edge end points)
BoundingCircle (Measure from border of circle surrounding edge end points)

input

Specifies how the length of an edge is measured.

Allowed Positions

tlp.StringCollection

Integer

Values:
All
Integer
Exponent

input

Specifies which positions for a node are allowed.

Tip Over

tlp.StringCollection

NoGrowingRow

Values:
None
NoGrowingRow
Always

input

Specifies in which case it is allowed to tip over drawings of connected components.

Pre Sort

tlp.StringCollection

DecreasingHeight

Values:
None (Do not presort)
DecreasingHeight (Presort by decreasing height of components)
DecreasingWidth (Presort by decreasing width of components)

input

Specifies how connected components are sorted before the packing algorithm is applied.

Galaxy Choice

tlp.StringCollection

NonUniformProbLowerMass

Values:
UniformProb
NonUniformProbLowerMass
NonUniformProbHigherMass

input

Specifies how sun nodes of galaxies are selected.

Max Iter Change

tlp.StringCollection

LinearlyDecreasing

Values:
Constant
LinearlyDecreasing
RapidlyDecreasing

input

Specifies how MaxIterations is changed in subsequent multilevels.

Initial Placement Mult

tlp.StringCollection

Advanced

Values:
Simple
Advanced

input

Specifies how the initial placement is generated.

Force Model

tlp.StringCollection

New

Values:
FruchtermanReingold (The force-model by Fruchterman, Reingold)
Eades (The force-model by Eades)
New (The new force-model)

input

Specifies the force-model.

Repulsive Force Method

tlp.StringCollection

NMM

Values:
Exact (Exact calculation)
GridApproximation (Grid approximation)
NMM (Calculation as for new multipole method)

input

Specifies how to calculate repulsive forces.

Initial Placement Forces

tlp.StringCollection

RandomRandIterNr

Values:
UniformGrid (Uniform placement on a grid)
RandomTime (Random placement, based on current time)
RandomRandIterNr (Random placement, based on randIterNr())
KeepPositions (No change in placement)

input

Specifies how the initial placement is done.

Reduced Tree Construction

tlp.StringCollection

SubtreeBySubtree

Values:
PathByPath
SubtreeBySubtree

input

Specifies how the reduced bucket quadtree is constructed.

Smallest Cell Finding

tlp.StringCollection

Iteratively

Values:
Iteratively (Iteratively, in constant time)
Aluru (According to formula by Aluru et al., in constant time)

input

Specifies how to calculate the smallest quadratic cell surrounding particles of a node in the reduced bucket quadtree.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('FM^3 (OGDF)', graph)

# set any input parameter value if needed
# params['Edge Length Property'] = ...
# params['Node Size'] = ...
# params['Unit edge length'] = ...
# params['New initial placement'] = ...
# params['Fixed iterations'] = ...
# params['Threshold'] = ...
# params['Page Format'] = ...
# params['Quality vs Speed'] = ...
# params['Edge Length Measurement'] = ...
# params['Allowed Positions'] = ...
# params['Tip Over'] = ...
# params['Pre Sort'] = ...
# params['Galaxy Choice'] = ...
# params['Max Iter Change'] = ...
# params['Initial Placement Mult'] = ...
# params['Force Model'] = ...
# params['Repulsive Force Method'] = ...
# params['Initial Placement Forces'] = ...
# params['Reduced Tree Construction'] = ...
# params['Smallest Cell Finding'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('FM^3 (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('FM^3 (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Fast Multipole Embedder (OGDF)

Description

Implements the fast multipole embedder layout algorithm of Martin Gronemann. It uses the same repulsive forces as FM³ of Hachul and Jünger, but slightly modified attractive forces.

Parameters

name

type

default

direction

description

number of iterations

int

100

input

The maximum number of iterations.

number of coefficients

int

5

input

The number of coefficients for the expansions.

randomize layout

bool

True

input

If true, the initial layout will be randomized.

default node size

float

20.0

input

The default node size.

default edge length

float

1.0

input

The default edge length.

number of threads

int

2

input

The number of threads to use during the computation of the layout.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Multipole Embedder (OGDF)', graph)

# set any input parameter value if needed
# params['number of iterations'] = ...
# params['number of coefficients'] = ...
# params['randomize layout'] = ...
# params['default node size'] = ...
# params['default edge length'] = ...
# params['number of threads'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Multipole Embedder (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Multipole Embedder (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Fast Multipole Multilevel Embedder (OGDF)

Description

The FMME layout algorithm is a variant of multilevel, force-directed layout, which utilizes various tools to speed up the computation.

Parameters

name

type

default

direction

description

number of threads

int

2

input

The number of threads to use during the computation of the layout.

multilevel nodes bound

int

10

input

The bound for the number of nodes in a multilevel step.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Multipole Multilevel Embedder (OGDF)', graph)

# set any input parameter value if needed
# params['number of threads'] = ...
# params['multilevel nodes bound'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Multipole Multilevel Embedder (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Multipole Multilevel Embedder (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Fast Overlap Removal

Description

Implements a layout algorithm removing nodes overlap first published as:
Fast Node Overlap Removal , Tim Dwyer, Kim Marriot, Peter J. Stuckey, Graph Drawing 2005, Vol. 3843 (2006), pp. 153-164, doi: <a href=”https://doi.org/10.1007/11618058_15”>10.1007/11618058_15</a>

Parameters

name

type

default

direction

description

overlap removal type

tlp.StringCollection

X-Y

Values:
X-Y (Remove overlaps in both X and Y directions)
X (Remove overlaps only in X direction)
Y (Remove overlaps only in Y direction)

input

Overlap removal type.

layout

tlp.LayoutProperty

viewLayout

input

The property used for the input layout of nodes and edges.

bounding box

tlp.SizeProperty

viewSize

input

The property used for node sizes.

rotation

tlp.DoubleProperty

viewRotation

input

The property defining rotation angles of nodes around the z-axis.

number of passes

int

5

input

The algorithm will be applied N times, each time increasing node size to attain original size at the final iteration. This greatly enhances the layout.

x border

float

0.0

input

The minimal x border value that will separate the graph nodes after application of the algorithm.

y border

float

0.0

input

The minimal y border value that will separate the graph nodes after application of the algorithm.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Overlap Removal', graph)

# set any input parameter value if needed
# params['overlap removal type'] = ...
# params['layout'] = ...
# params['bounding box'] = ...
# params['rotation'] = ...
# params['number of passes'] = ...
# params['x border'] = ...
# params['y border'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Overlap Removal', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Overlap Removal', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Fruchterman Reingold (OGDF)

Description

Implements the Fruchterman and Reingold layout algorithm, first published as:
Graph Drawing by Force-Directed Placement , Fruchterman, Thomas M. J., Reingold, Edward M., Software – Practice & Experience (Wiley) Volume 21, Issue 11, pages 1129–1164, (1991)

Parameters

name

type

default

direction

description

iterations

int

1000

input

The number of iterations.

noise

bool

True

input

Sets the parameter noise.

use node weights

bool

False

input

Indicates if the node weights have to be used.

node weights

tlp.NumericProperty

viewMetric

input

The metric containing node weights.

Cooling function

tlp.StringCollection

Factor

Values:
Factor
Logarithmic

input

Sets the parameter cooling function

ideal edge length

float

10.0

input

The ideal edge length.

minDistCC

float

20.0

input

The minimal distance between connected components.

pageRatio

float

1.0

input

The page ratio used for packing connected components.

check convergence

bool

True

input

Indicates if the convergence has to be checked.

convergence tolerance

float

0.01

input

The convergence tolerance parameter.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fruchterman Reingold (OGDF)', graph)

# set any input parameter value if needed
# params['iterations'] = ...
# params['noise'] = ...
# params['use node weights'] = ...
# params['node weights'] = ...
# params['Cooling function'] = ...
# params['ideal edge length'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# params['check convergence'] = ...
# params['convergence tolerance'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fruchterman Reingold (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fruchterman Reingold (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GEM (Frick)

Description

Implements the GEM-2d layout algorithm first published as:
A fast, adaptive layout algorithm for undirected graphs , A. Frick, A. Ludwig, and H. Mehldau, Graph Drawing’94, Volume 894 of Lecture Notes in Computer Science (1995), doi: <a href=”https://doi.org/10.1007/3-540-58950-3_393”>10.1007/3-540-58950-3_393</a>

Parameters

name

type

default

direction

description

3D layout

bool

False

input

If true, the layout is in 3D else it is computed in 2D.

edge length

tlp.NumericProperty

input

This metric is used to compute the length of edges.

initial layout

tlp.LayoutProperty

input

The layout property used to compute the initial position of the graph elements. If none is given the initial position will be computed by the algorithm.

unmovable nodes

tlp.BooleanProperty

input

This property is used to indicate the unmovable nodes, the ones for which a new position will not be computed by the algorithm. This property is taken into account only if a layout property has been given to get the initial position of the unmovable nodes.

max iterations

int

0

input

This parameter allows to choose the number of iterations. The default value of 0 corresponds to (3 * nb_nodes * nb_nodes) if the graph has more than 100 nodes. For smaller graph, the number of iterations is set to 30 000.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GEM (Frick)', graph)

# set any input parameter value if needed
# params['3D layout'] = ...
# params['edge length'] = ...
# params['initial layout'] = ...
# params['unmovable nodes'] = ...
# params['max iterations'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GEM (Frick)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GEM (Frick)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GEM Frick (OGDF)

Description

Implements the GEM-2d layout algorithm first published as:
A fast, adaptive layout algorithm for undirected graphs , A. Frick, A. Ludwig, and H. Mehldau, Graph Drawing’94, Volume 894 of Lecture Notes in Computer Science (1995).

Parameters

name

type

default

direction

description

number of rounds

int

30000

input

The maximal number of rounds per node.

minimal temperature

float

0.005

input

The minimal temperature.

initial temperature

float

12.0

input

The initial temperature to x; must be >= minimalTemperature.

gravitational constant

float

0.0625

input

Gravitational constant parameter.

desired length

float

5.0

input

The desired edge length to x; must be >= 0.

maximal disturbance

float

0.0

input

The maximal disturbance to x; must be >= 0.

rotation angle

float

1.04719755

input

The opening angle for rotations to x (0 <= x <= pi / 2).

oscillation angle

float

1.57079633

input

Sets the opening angle for oscillations to x (0 <= x <= pi / 2).

rotation sensitivity

float

0.01

input

The rotation sensitivity to x (0 <= x <= 1).

oscillation sensitivity

float

0.3

input

The oscillation sensitivity to x (0 <= x <= 1).

Attraction formula

tlp.StringCollection

Fruchterman/Reingold

Values:
Fruchterman/Reingold
GEM

input

The formula for attraction.

minDistCC

float

20

input

The minimal distance between connected components.

pageRatio

float

1.0

input

The page ratio used for packing connected components.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GEM Frick (OGDF)', graph)

# set any input parameter value if needed
# params['number of rounds'] = ...
# params['minimal temperature'] = ...
# params['initial temperature'] = ...
# params['gravitational constant'] = ...
# params['desired length'] = ...
# params['maximal disturbance'] = ...
# params['rotation angle'] = ...
# params['oscillation angle'] = ...
# params['rotation sensitivity'] = ...
# params['oscillation sensitivity'] = ...
# params['Attraction formula'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GEM Frick (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GEM Frick (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

GRIP

Description

Implements a force directed graph drawing algorithm first published as:
GRIP: Graph dRawing with Intelligent Placement , P. Gajer and S.G. Kobourov, Graph Drawing (GD) 2000, Lecture Notes in Computer Science, vol 1984. Springer, Berlin, Heidelberg. doi: <a href=”https://doi.org/10.1007/3-540-44541-2_21”>10.1007/3-540-44541-2_21</a>

Parameters

name

type

default

direction

description

3D layout

bool

False

input

If true the layout is in 3D else it is computed in 2D

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GRIP', graph)

# set any input parameter value if needed
# params['3D layout'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GRIP', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GRIP', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

H3

Description

Implements the H3 layout technique for drawing large directed graphs as node-link diagrams in 3D hyperbolic space. That algorithm can lay out much larger structures than can be handled using traditional techniques for drawing general graphs because it assumes a hierarchical nature of the data. It was first published as:
H3: Laying out Large Directed Graphs in 3D Hyperbolic Space , Tamara Munzner, Proceedings of the 1997 IEEE Symposium on Information Visualization, Phoenix, AZ, pp 2-10, 1997.
The implementation in Python (MIT License) has been written by BuzzFeed engineers (https://github.com/buzzfeed/pyh3).

Parameters

name

type

default

direction

description

layout scaling

float

1000

input

the scale factor to apply to the computed layout

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('H3', graph)

# set any input parameter value if needed
# params['layout scaling'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('H3', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('H3', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Hierarchical Graph

Description

Implements the hierarchical layout algorithm first published as:
Tulip - A Huge Graph Visualization Framework , D. Auber, Book. Graph Drawing Software. (Ed. Michael Junger & Petra Mutzel) pages 105–126. (2004).

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

horizontal

Values:
horizontal
vertical

input

This parameter enables to choose the orientation of the drawing.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical Graph', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Hierarchical Graph', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Hierarchical Graph', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Hierarchical Tree (R-T Extended)

Description

Implements the hierarchical tree layout algorithm first published as:
Tidier Drawings of Trees , E.M. Reingold and J.S. Tilford, IEEE Transactions on Software Engineering pages 223–228 (1981), doi: <a href=”https://doi.org/10.1109/TSE.1981.234519”>doi.org/10.1109/TSE.1981.234519</a>.

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

edge length

tlp.IntegerProperty

input

This parameter indicates the property used to compute the length of edges.

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

This parameter enables to choose the orientation of the drawing.

orthogonal

bool

True

input

This parameter enables to choose if the tree is drawn orthogonally or not.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

bounding circles

bool

False

input

Indicates if the node bounding objects are boxes or bounding circles.

compact layout

bool

True

input

Indicates if a compact layout is computed.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical Tree (R-T Extended)', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['edge length'] = ...
# params['orientation'] = ...
# params['orthogonal'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# params['bounding circles'] = ...
# params['compact layout'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Hierarchical Tree (R-T Extended)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Hierarchical Tree (R-T Extended)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Improved Walker

Description

It is a linear implementation of the Walker’s tree layout improved algorithm published as:
Improving Walker’s Algorithm to Run in Linear Time.
Buchheim C., Jünger M., Leipert S. (2002), In: Goodrich M.T., Kobourov S.G. (eds) Graph Drawing (GD) 2002, Lecture Notes in Computer Science, vol 2528. Springer, Berlin, Heidelberg. <a href=”https://doi.org/10.1007/3-540-36151-0_32”>10.1007/3-540-36151-0_32</a>

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

up to down

Values:
up to down
down to up
right to left
left to right

input

Choose a desired orientation.

orthogonal

bool

False

input

If true then use orthogonal edges.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Improved Walker', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['orthogonal'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Improved Walker', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Improved Walker', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Improved Walker (OGDF)

Description

Implements a linear-time tree layout algorithm with straight-line or orthogonal edge routing.

Parameters

name

type

default

direction

description

siblings distance

float

20

input

The minimal required horizontal distance between siblings.

subtrees distance

float

20

input

The minimal required horizontal distance between subtrees.

levels distance

float

50

input

The minimal required vertical distance between levels.

trees distance

float

50

input

The minimal required horizontal distance between trees in the forest.

orthogonal layout

bool

False

input

Indicates whether orthogonal edge routing style is used or not.

Orientation

tlp.StringCollection

topToBottom

Values:
topToBottom (Edges are oriented from top to bottom)
bottomToTop (Edges are oriented from bottom to top)
leftToRight (Edges are oriented from left to right)
rightToLeft (Edges are oriented from right to left)

input

This parameter indicates the orientation of the layout.

Root selection

tlp.StringCollection

Source

Values:
Source (Select a source in the graph)
Sink (Select a sink in the graph)
ByCoord (Use the coordinates, e.g., select the topmost node if orientation is topToBottom)

input

This parameter indicates how the root is selected.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Improved Walker (OGDF)', graph)

# set any input parameter value if needed
# params['siblings distance'] = ...
# params['subtrees distance'] = ...
# params['levels distance'] = ...
# params['trees distance'] = ...
# params['orthogonal layout'] = ...
# params['Orientation'] = ...
# params['Root selection'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Improved Walker (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Improved Walker (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Kamada Kawai (OGDF)

Description

Implements the Kamada-Kawai layout algorithm.
It is a force-directed layout algorithm that tries to place vertices with a distance corresponding to their graph theoretic distance.

Parameters

name

type

default

direction

description

stop tolerance

float

0.001

input

The value for the stop tolerance, below which the system is regarded stable (balanced) and the optimization stopped.

used layout

bool

True

input

If set to true, the given layout is used for the initial positions.

zero length

float

0

input

If set != 0, value zerolength is used to determine the desirable edge length by L = zerolength / max distance_ij. Otherwise, zerolength is determined using the node number and sizes.

edge length

float

0

input

The desirable edge length.

compute max iterations

bool

True

input

If set to true, the number of iterations is computed depending on G.

global iterations

int

50

input

The number of global iterations.

local iterations

int

50

input

The number of local iterations.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Kamada Kawai (OGDF)', graph)

# set any input parameter value if needed
# params['stop tolerance'] = ...
# params['used layout'] = ...
# params['zero length'] = ...
# params['edge length'] = ...
# params['compute max iterations'] = ...
# params['global iterations'] = ...
# params['local iterations'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Kamada Kawai (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Kamada Kawai (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

LinLog

Description

Implements the LinLog layout algorithm, an energy model layout algorithm, first published as:
Energy Models for Graph Clustering , Andreas Noack., Journal of Graph Algorithms and Applications 11(2):453-480, 2007, doi: <a href=”https://dx.doi.org/10.7155/jgaa.00154”>10.7155/jgaa.00154</a>

Parameters

name

type

default

direction

description

3D layout

bool

False

input

If true the layout is in 3D else it is computed in 2D

octtree

bool

True

input

If true, use the OctTree optimization

edge weight

tlp.NumericProperty

input

This property is used to compute the length of edges.

max iterations

int

100

input

This parameter allows to limit the number of iterations. The value of 0 corresponds to a default value of 100.

repulsion exponent

float

0.0

input

This parameter allows to set the exponent of attraction.

attraction exponent

float

1.0

input

This parameter allows to set the exponent of repulsion.

gravitation factor

float

0.05

input

This parameter allows to set the factor of gravitation.

skip nodes

tlp.BooleanProperty

input

This boolean property is used to skip nodes in computation when their value are set to true.

initial layout

tlp.LayoutProperty

input

The layout property used to compute the initial position of the graph elements. If none is given the initial position will be computed by the algorithm.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('LinLog', graph)

# set any input parameter value if needed
# params['3D layout'] = ...
# params['octtree'] = ...
# params['edge weight'] = ...
# params['max iterations'] = ...
# params['repulsion exponent'] = ...
# params['attraction exponent'] = ...
# params['gravitation factor'] = ...
# params['skip nodes'] = ...
# params['initial layout'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('LinLog', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('LinLog', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Mixed Model

Description

Implements the planar polyline graph drawing algorithm, the mixed model algorithm, first published as:
Planar Polyline Drawings with Good Angular Resolution , C. Gutwenger and P. Mutzel, LNCS, Vol. 1547 pages 167–182 (1999), doi: <a href=”https://doi.org/10.1007/3-540-37623-2_13”>https://doi.org/10.1007/3-540-37623-2_13</a>

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input / output

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

This parameter enables to choose the orientation of the drawing.

y node-node spacing

float

2

input

This parameter defines the minimum y-spacing between any two nodes.

x node-node and edge-node spacing

float

2

input

This parameter defines the minimum x-spacing between any two nodes or between a node and an edge.

shape property

tlp.IntegerProperty

viewShape

output

This parameter defines the property holding edges shapes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Mixed Model', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['y node-node spacing'] = ...
# params['x node-node and edge-node spacing'] = ...
# params['shape property'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Mixed Model', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Mixed Model', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Node Respecter (OGDF)

Description

This is a force-directed layout algorithm respecting the shapes and sizes of nodes.It aims to minimize the number of node overlaps as well as the number of edges crossing through non-incident nodes.In order to achieve this, the algorithm adapts its forces to the node sizes and bends edges around close-by nodes.The edge bends are created by introducing dummy nodes into the graph, positioning all nodes according to forces acting upon them,filtering out unnecessary dummy nodes, and then replacing the remaining dummy nodes by edge bends.The algorithm is documented in and was developed for the bachelor thesis: Max Ilsen: Energy-Based Layout Algorithms for Graphs with Large Nodes. University of Osnabrueck, 2017

Parameters

name

type

default

direction

description

random initial placement

bool

True

input

Use a random initial placement

Post Processing

tlp.StringCollection

None

Values:
None (Keep all bends. )
KeepMultiEdgeBends (Activate post-processing but keep all bends on multi-edges and self-loops (such that the corresponding edges are visible).)
Complete (Activate post-processing: Remove all bends that do not prevent edge-node intersections.)

input

Sets whether unnecessary edge bends should be filtered out in a post-processing step.

Bends Normalization Angle

float

3.141593

input

Sets bends normalization angle in [0…Pi].

number of iterations

int

30000

input

The maximum number of iterations >=0.

Minimal Temperature

float

1.0

input

The minimal Temperature >= 0

Initial Temperature

float

10.0

input

Sets the initial Temperature > Minimal Temperature.

Temperature Decrease

float

0.0

input

Sets temperature Decrease Offset in [0…1].

Gravitation

float

0.0625

input

Sets Gravitation >= 0.

Oscillation Angle

float

1.570796

input

Sets Oscillation Angle in [0…Pi].

Desired Minimal Edge Length

float

20.000000

input

Sets desired Min Edge Length > 0.

Init Dummies Per Edge

int

1

input

Sets init Dummies Per Edge >= 0.

Maximal Dummies Per Edge

int

3

input

Sets Dummies Per Edge > init Dummies Per Edge.

Dummy Insertion Threshold

float

5

input

Sets dummy Insertion Threshold >= 1.

Maximum Disturbance

float

0

input

Sets max Disturbance >= 0.

Repulsion Distance

float

40.000000

input

Sets repulsion Distance >= 0. By default, it is the double of Desired Minimal Edge Length

Min Distance CC

float

30.000000

input

Sets min Distance between CC >= 0.

Page Ratio

float

1.0

input

Sets Page Ratio > 0.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Node Respecter (OGDF)', graph)

# set any input parameter value if needed
# params['random initial placement'] = ...
# params['Post Processing'] = ...
# params['Bends Normalization Angle'] = ...
# params['number of iterations'] = ...
# params['Minimal Temperature'] = ...
# params['Initial Temperature'] = ...
# params['Temperature Decrease'] = ...
# params['Gravitation'] = ...
# params['Oscillation Angle'] = ...
# params['Desired Minimal Edge Length'] = ...
# params['Init Dummies Per Edge'] = ...
# params['Maximal Dummies Per Edge'] = ...
# params['Dummy Insertion Threshold'] = ...
# params['Maximum Disturbance'] = ...
# params['Repulsion Distance'] = ...
# params['Min Distance CC'] = ...
# params['Page Ratio'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Node Respecter (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Node Respecter (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

OrthoTree

Description

Orthogonal Tree layout

Parameters

name

type

default

direction

description

layer spacing

int

10

input

Define the spacing between two successive layers

node spacing

int

4

input

Define the spacing between two nodes

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('OrthoTree', graph)

# set any input parameter value if needed
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('OrthoTree', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('OrthoTree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Perfect aspect ratio

Description

Scales the graph layout to get an aspect ratio of 1.

Parameters

name

type

default

direction

description

layout

tlp.LayoutProperty

viewLayout

input

The layout property from which a perfect aspect ratio has to be computed.

Subgraph only

bool

False

input

When applied on a subgraph, scales only the layout of this subgraph

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Perfect aspect ratio', graph)

# set any input parameter value if needed
# params['layout'] = ...
# params['Subgraph only'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Perfect aspect ratio', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Perfect aspect ratio', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Pivot MDS (OGDF)

Description

The Pivot MDS (multi-dimensional scaling) layout algorithm. By setting the number of pivots to infinity this algorithm behaves just like classical MDS. See:
Eigensolver methods for progressive multidimensional scaling of large data. Brandes and Pich

Parameters

name

type

default

direction

description

number of pivots

int

250

input

Sets the number of pivots. If the new value is smaller or equal 0 the default value (250) is used.

use edge costs

bool

False

input

Sets if the edge costs attribute has to be used.

edge costs

float

100

input

Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default value (100) is used.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Pivot MDS (OGDF)', graph)

# set any input parameter value if needed
# params['number of pivots'] = ...
# params['use edge costs'] = ...
# params['edge costs'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Pivot MDS (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Pivot MDS (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Planarization Grid (OGDF)

Description

The planarization grid layout algorithm applies the planarization approach for crossing minimization, combined with the topology-shape-metrics approach for orthogonal planar graph drawing. It produces drawings with few crossings and is suited for small to medium sized sparse graphs. It uses a planar grid layout algorithm to produce a drawing on a grid.

Parameters

name

type

default

direction

description

page ratio

float

1.1

input

Sets the option pageRatio.

number of crossings

int

output

Returns the number of crossings in the computed layout

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planarization Grid (OGDF)', graph)

# set any input parameter value if needed
# params['page ratio'] = ...
# params['number of crossings'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Planarization Grid (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Planarization Grid (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Planarization Layout (OGDF)

Description

The planarization approach for drawing graphs.

Parameters

name

type

default

direction

description

page ratio

float

1.1

input

Sets the option page ratio.

minimal clique size

int

3

input

If preprocessing of cliques is considered, this option determines the minimal size of cliques to search for

Embedder

tlp.StringCollection

SimpleEmbedder

Values:
SimpleEmbedder (Planar graph embedding from the algorithm of Boyer and Myrvold)
EmbedderMaxFace (Planar graph embedding with maximum external face)
EmbedderMaxFaceLayers (Planar graph embedding with maximum external face, plus layers approach)
EmbedderMinDepth (Planar graph embedding with minimum block-nesting depth)
EmbedderMinDepthMaxFace (Planar graph embedding with minimum block-nesting depth and maximum external face)
EmbedderMinDepthMaxFaceLayers (Planar graph embedding with minimum block-nesting depth and maximum external face, plus layers approach)
EmbedderMinDepthPiTa (Planar graph embedding with minimum block-nesting depth for given embedded blocks) EmbedderOptimalFlexDraw (Planar graph embedding with minimum cost)

input

The result of the crossing minimization step is a planar graph, in which crossings are replaced by dummy nodes. The embedder then computes a planar embedding of this planar graph.

number of crossings

int

output

Returns the number of crossings in the computed layout.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planarization Layout (OGDF)', graph)

# set any input parameter value if needed
# params['page ratio'] = ...
# params['minimal clique size'] = ...
# params['Embedder'] = ...
# params['number of crossings'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Planarization Layout (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Planarization Layout (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Radial Tree (OGDF)

Description

The radial tree layout algorithm.

Parameters

name

type

default

direction

description

levels distance

float

50

input

The minimal required vertical distance between levels.

trees distance

float

50

input

The minimal required horizontal distance between trees in the forest.

Root selection

tlp.StringCollection

Source

Values:
Source (Select a source in the graph)
Sink (Select a sink in the graph)
Center (Select the center of the tree

input

This parameter indicates how the root is selected.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Radial Tree (OGDF)', graph)

# set any input parameter value if needed
# params['levels distance'] = ...
# params['trees distance'] = ...
# params['Root selection'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Radial Tree (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Radial Tree (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Random layout

Description

The positions of the graph nodes are randomly selected in a 1024x1024 square.

Parameters

name

type

default

direction

description

3D layout

bool

False

input

If true, the layout is computed in 3D, else it is computed in 2D.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Random layout', graph)

# set any input parameter value if needed
# params['3D layout'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Random layout', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Random layout', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Squarified Tree Map

Description

Implements a TreeMap and Squarified Treemap layout.
For Treemap see:
Tree visualization with treemaps: a 2-d space-filling approach , Shneiderman B., ACM Transactions on Graphics, vol. 11, 1 pages 92-99 (1992).
For Squarified Treemaps see:
Bruls, M., Huizing, K., & van Wijk, J. J. Proc. of Joint Eurographics and IEEE TCVG Symp. on Visualization (TCVG 2000) IEEE Press, pp. 33-42.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

This parameter defines the metric used to estimate the size allocated to each node.

Aspect Ratio

float

input

This parameter enables to set up the aspect ratio (height/width) for the rectangle corresponding to the root node.

Treemap Type

bool

False

input

This parameter indicates to use normal Treemaps (B. Shneiderman) or Squarified Treemaps (J. J. van Wijk)

Node Size

tlp.SizeProperty

viewSize

output

This parameter defines the property used as node sizes.

Node Shape

tlp.IntegerProperty

viewShape

output

This parameter defines the property used as node shapes.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Squarified Tree Map', graph)

# set any input parameter value if needed
# params['metric'] = ...
# params['Aspect Ratio'] = ...
# params['Treemap Type'] = ...
# params['Node Size'] = ...
# params['Node Shape'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Squarified Tree Map', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Squarified Tree Map', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Stress Minimization (OGDF)

Description

Implements an alternative to force-directed layout which is a distance-based layout realized by the stress minimization via majorization algorithm.

Parameters

name

type

default

direction

description

terminationCriterion

tlp.StringCollection

None

Values:
None
PositionDifference
Stress

input

Tells which TERMINATION_CRITERIA should be used.

fixXCoordinates

bool

False

input

Tells whether the x coordinates are allowed to be modified or not.

fixYCoordinates

bool

False

input

Tells whether the y coordinates are allowed to be modified or not.

fixZCoordinates

bool

False

input

Tells whether the z coordinates are allowed to be modified or not.

hasInitialLayout

bool

False

input

Tells whether the current layout should be used or the initial layout needs to be computed.

layoutComponentsSeparately

bool

False

input

Sets whether the graph components should be layouted separately or a dummy distance should be used for nodes within different components.

numberOfIterations

int

200

input

Sets a fixed number of iterations for stress majorization. If the new value is smaller or equal 0 the default value (200) is used.

edgeCosts

float

100

input

Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default value (100) is used.

useEdgeCostsProperty

bool

False

input

Tells whether the edge costs are uniform or defined in an edge costs property.

edgeCostsProperty

tlp.NumericProperty

viewMetric

input

The numeric property that holds the desired cost for each edge.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Stress Minimization (OGDF)', graph)

# set any input parameter value if needed
# params['terminationCriterion'] = ...
# params['fixXCoordinates'] = ...
# params['fixYCoordinates'] = ...
# params['fixZCoordinates'] = ...
# params['hasInitialLayout'] = ...
# params['layoutComponentsSeparately'] = ...
# params['numberOfIterations'] = ...
# params['edgeCosts'] = ...
# params['useEdgeCostsProperty'] = ...
# params['edgeCostsProperty'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Stress Minimization (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Stress Minimization (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Sugiyama (OGDF)

Description

Implements the classical layout algorithm by Sugiyama, Tagawa, and Toda. It is a layer-based approach for producing upward drawings.

Parameters

name

type

default

direction

description

fails

int

4

input

The number of times that the number of crossings may not decrease after a complete top-down bottom-up traversal, before a run is terminated.

runs

int

15

input

Determines, how many times the crossing minimization is repeated. Each repetition (except for the first) starts with randomly permuted nodes on each layer. Deterministic behaviour can be achieved by setting runs to 1.

node distance

float

3

input

The minimal horizontal distance between two nodes on the same layer.

layer distance

float

3

input

The minimal vertical distance between two nodes on neighboring layers.

fixed layer distance

bool

False

input

If true, the distance between neighboring layers is fixed, otherwise variable (only for FastHierarchyLayout).

transpose

bool

True

input

If this option is set to true an additional fine tuning step is performed after each traversal, which tries to reduce the total number of crossings by switching adjacent vertices on the same layer.

arrangeCCs

bool

True

input

If set to true connected components are laid out separately and the resulting layouts are arranged afterwards using the packer module.

minDistCC

float

20

input

Specifies the spacing between connected components of the graph.

pageRatio

float

1.0

input

The page ratio used for packing connected components.

alignBaseClasses

bool

False

input

Determines if base classes of inheritance hierarchies shall be aligned.

alignSiblings

bool

False

input

Sets the option alignSiblings.

Ranking

tlp.StringCollection

LongestPathRanking

Values:
CoffmanGrahamRanking (The coffman graham ranking algorithm)
LongestPathRanking (the well-known longest-path ranking algorithm)
OptimalRanking (the LP-based algorithm for computing a node ranking with minimal edge lengths)

input

Sets the option for the node ranking (layer assignment).

Two-layer crossing minimization

tlp.StringCollection

BarycenterHeuristic

Values:
BarycenterHeuristic (the barycenter heuristic for 2-layer crossing minimization)
GreedyInsertHeuristic (The greedy-insert heuristic for 2-layer crossing minimization)
GreedySwitchHeuristic (The greedy-switch heuristic for 2-layer crossing minimization)
MedianHeuristic (the median heuristic for 2-layer crossing minimization)
SiftingHeuristic (The sifting heuristic for 2-layer crossing minimization)
SplitHeuristic (the split heuristic for 2-layer crossing minimization)
GridSiftingHeuristic (the grid sifting heuristic for 2-layer crossing minimization)
GlobalSiftingHeuristic (the global sifting heuristic for 2-layer crossing minimization)

input

Sets the module option for the two-layer crossing minimization.

Layout

tlp.StringCollection

FastHierarchyLayout

Values:
FastHierarchyLayout (Coordinate assignment phase for the Sugiyama algorithm by Buchheim et al.)
FastSimpleHierarchyLayout (Coordinate assignment phase for the Sugiyama algorithm by Ulrik Brandes and Boris Koepf)
OptimalHierarchyLayout (The LP-based hierarchy layout algorithm)

input

The hierarchy layout module that computes the final layout.

transpose vertically

bool

True

input

Transpose the layout vertically from top to bottom.

Number of crossings

int

output

Returns the number of crossings in the computed layout.

Number of levels/layers

int

output

Returns the number of layers/levels in the computed layout.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Sugiyama (OGDF)', graph)

# set any input parameter value if needed
# params['fails'] = ...
# params['runs'] = ...
# params['node distance'] = ...
# params['layer distance'] = ...
# params['fixed layer distance'] = ...
# params['transpose'] = ...
# params['arrangeCCs'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# params['alignBaseClasses'] = ...
# params['alignSiblings'] = ...
# params['Ranking'] = ...
# params['Two-layer crossing minimization'] = ...
# params['Layout'] = ...
# params['transpose vertically'] = ...
# params['Number of crossings'] = ...
# params['Number of levels/layers'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Sugiyama (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Sugiyama (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Tile To Rows Packing (OGDF)

Description

The tile-to-rows algorithm for packing drawings of connected components.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tile To Rows Packing (OGDF)', graph)

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tile To Rows Packing (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tile To Rows Packing (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Tree Leaf

Description

Implements a simple level-based tree layout.
All leaves are placed at a distance one (x-coordinates) and the order is the one of a suffix ordering. The y coordinates is the depth in the tree. The other nodes are placed at the center of their children (x-coordinates), and the y-coordinate is their depth in the tree.

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

orientation

tlp.StringCollection

up to down

Values:
up to down
down to up
right to left
left to right

input

Choose a desired orientation.

uniform layer spacing

bool

True

input

If the layer spacing is uniform, the spacing between two consecutive layers will be the same.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tree Leaf', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['uniform layer spacing'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tree Leaf', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tree Leaf', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Tree Radial

Description

Implements the radial tree layout algorithm first published as:
MoireGraphs: Radial Focus+Context Visualization and Interaction for Graphs with Visual Nodes T. J. Jankun-Kelly, Kwan-Liu Ma. Proc. IEEE Symposium on Information Visualization, INFOVIS pages 59–66 (2003).

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

This parameter defines the property used for node sizes.

layer spacing

float

input

This parameter enables to set up the minimum space between two layers in the drawing.

node spacing

float

input

This parameter enables to set up the minimum space between two nodes in the same layer.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tree Radial', graph)

# set any input parameter value if needed
# params['node size'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tree Radial', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tree Radial', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Upward Planarization (OGDF)

Description

Implements an alternative to the classical Sugiyama approach. It adapts the planarization approach for hierarchical graphs and produces significantly less crossings than Sugiyama layout.

Parameters

name

type

default

direction

description

transpose

bool

False

input

If true, transpose the layout vertically.

number of crossings

int

output

Returns the number of crossings

number of layers

int

output

Returns the number of layers/levels

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Upward Planarization (OGDF)', graph)

# set any input parameter value if needed
# params['transpose'] = ...
# params['number of crossings'] = ...
# params['number of layers'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Upward Planarization (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Upward Planarization (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Visibility (OGDF)

Description

Implements a simple upward drawing algorithm based on visibility representations (horizontal segments for nodes, vertical segments for edges).

Parameters

name

type

default

direction

description

minimum grid distance

int

1

input

The minimum grid distance.

transpose

bool

False

input

If true, transpose the layout vertically.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Visibility (OGDF)', graph)

# set any input parameter value if needed
# params['minimum grid distance'] = ...
# params['transpose'] = ...

# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Visibility (OGDF)', resultLayout, params)

# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Visibility (OGDF)', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Measure

To call these plugins, you must use the tlp.Graph.applyDoubleAlgorithm() method. See also Calling a property algorithm on a graph for more details.

Betweenness Centrality

Description

Computes the betweeness centrality as described for:

  • nodes in A Faster Algorithm for Betweenness Centrality , U. Brandes, Journal of Mathematical Sociology volume 25, pages 163-177 (2001), doi: <a href=”https://doi.org/10.1080/0022250X.2001.9990249”>10.1080/0022250X.2001.9990249</a>
  • edges in Finding and evaluating community structure in networks , M. E. J. Newman and M. Girvan, Physics Reviews E, volume 69 (2004), doi: <a href=”https://doi.org/10.1103/PhysRevE.69.026113”>10.1103/PhysRevE.69.026113</a>.
The average path length is also computed.

Parameters

name

type

default

direction

description

directed

bool

False

input

Indicates if the graph should be considered as directed or not.

norm

bool

False

input

If true the node measure will be normalized
- if not directed: m(n) = 2*c(n) / (#V - 1)(#V - 2)
- if directed : m(n) = c(n) / (#V - 1)(#V - 2)
If true the edge measure will be normalized
- if not directed: m(e) = 2*c(e) / (#V / 2)(#V / 2)
- if directed : m(e) = c(e) / (#V / 2)(#V / 2)

weight

tlp.NumericProperty

input

An existing edge weight metric property.

average path length

float

output

The computed average path length

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Indicates whether the metric is computed only for nodes, edges, or both.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Betweenness Centrality', graph)

# set any input parameter value if needed
# params['directed'] = ...
# params['norm'] = ...
# params['weight'] = ...
# params['average path length'] = ...
# params['target'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Betweenness Centrality', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Betweenness Centrality', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Biconnected Component

Description

Implements a biconnected component decomposition.It assigns the same value to all the edges in the same component.

Parameters

name

type

default

direction

description

#biconnected components

int

output

Number of biconnected components found

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Biconnected Component', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Biconnected Component', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Biconnected Component', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Cluster

Description

Computes the Cluster metric as described in:
Software component capture using graph clustering , Y. Chiricota. F. Jourdan, an G. Melancon, Proceedings of the 11th IEEE International Workshop on Program Comprehension, 2003.doi: <a href=”https://doi.org/10.1109/WPC.2003.1199205”>10.1109/WPC.2003.1199205</a>

Parameters

name

type

default

direction

description

depth

int

1

input

Maximal depth of a computed cluster.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Cluster', graph)

# set any input parameter value if needed
# params['depth'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Cluster', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Cluster', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Connected Component

Description

Implements a decomposition in connected components. This algorithm assigns to each node a value defined as following: if two nodes are in the same connected component they have the same value else they have a different value. Edges get the value of their source node.

Parameters

name

type

default

direction

description

#connected components

int

output

Number of components found

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Connected Component', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Connected Component', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Convolution

Description

Discretization and filtering of the distribution of a node metric using a convolution following:
Strahler based graph clustering using convolution, D. Auber, M. Delest and Y. Chiricota, Proceedings of the Eighth International Conference on Information Visualisation, 2004. IV 2004, doi: <a href=”https://doi.org/10.1109/IV.2004.1320123”>10.1109/IV.2004.1320123</a>

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

An existing node metric property.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Convolution', graph)

# set any input parameter value if needed
# params['metric'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Convolution', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Convolution', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Dag Level

Description

Implements a DAG layer decomposition.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dag Level', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Dag Level', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Dag Level', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Degree

Description

Assigns its degree to each node.

Parameters

name

type

default

direction

description

type

tlp.StringCollection

InOut

Values:
InOut
In
Out

input

Type of degree to compute (in/out/inout).

metric

tlp.NumericProperty

input

The weighted degree of a node is the sum of weights of all its in/out/inout edges. If no metric is specified, using a uniform metric value of 1 for all edges returns the usual degree for nodes (number of neighbors).

norm

bool

False

input

If true, the measure is normalized in the following way.

  • Unweighted case: m(n) = deg(n) / (#V - 1)
  • Weighted case: m(n) = deg_w(n) / [(sum(e_w)/#E)(#V - 1)]

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Degree', graph)

# set any input parameter value if needed
# params['type'] = ...
# params['metric'] = ...
# params['norm'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Degree', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Degree', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Depth

Description

For each node n on an acyclic graph,it computes the maximum path length between n and the other node.
The graph must be acyclic .

Parameters

name

type

default

direction

description

edge weight

tlp.NumericProperty

input

This parameter defines the metric used for edge weights.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Depth', graph)

# set any input parameter value if needed
# params['edge weight'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Depth', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Depth', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Eccentricity

Description

Computes the eccentricity/closeness centrality of each node.
Eccentricity is the maximum distance to go from a node to all others. In this version the Eccentricity value can be normalized (1 means that a node is one of the most eccentric in the network, 0 means that a node is on the centers of the network).
Closeness Centrality is the mean of shortest-paths lengths from a node to others. The normalized values are computed using the reciprocal of the sum of these distances.

Parameters

name

type

default

direction

description

closeness centrality

bool

False

input

If true, the closeness centrality is computed (i.e. the average distance from a node to all others).

norm

bool

True

input

If true, the returned values are normalized. For the closeness centrality, the reciprocal of the sum of distances is returned. The eccentricity values are divided by the graph diameter. Warning: The normalized eccentricity values should be computed on a (strongly) connected graph.

directed

bool

False

input

If true, the graph is considered directed.

weight

tlp.NumericProperty

input

An existing edge weight metric property.

graph diameter

float

-1

output

The computed diameter (-1 if not computed)

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Eccentricity', graph)

# set any input parameter value if needed
# params['closeness centrality'] = ...
# params['norm'] = ...
# params['directed'] = ...
# params['weight'] = ...
# params['graph diameter'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Eccentricity', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Eccentricity', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Id

Description

Assigns their Tulip id to nodes and edges.

Parameters

name

type

default

direction

description

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Whether the id is copied only for nodes, only for edges, or for both.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Id', graph)

# set any input parameter value if needed
# params['target'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Id', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Id', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

K-Cores

Description

Node partitioning measure based on the K-core decomposition of a graph.
K-cores were first introduced in:
Network structure and minimum degree , S. B. Seidman, Social Networks 5:269-287 (1983), doi: <a href=”https://doi.org/10.1016/0378-8733(83)90028-X”>10.1016/0378-8733(83)90028-X</a>.
This is a method for simplifying a graph topology which helps in analysis and visualization of social networks.
Note : use the default parameters to compute simple K-Cores (undirected and unweighted).

Parameters

name

type

default

direction

description

type

tlp.StringCollection

InOut

Values:
InOut
In
Out

input

This parameter indicates the direction used to compute K-Cores values.

metric

tlp.NumericProperty

input

An existing edge metric property, used to specify the weights of edges.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('K-Cores', graph)

# set any input parameter value if needed
# params['type'] = ...
# params['metric'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('K-Cores', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('K-Cores', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Leaf

Description

Computes the number of leaves in the subtree induced by each node.
The graph must be acyclic .

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Leaf', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Leaf', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Leaf', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Louvain

Description

Nodes partitioning measure used for community detection.This is an implementation of the Louvain clustering algorithm first published in:
Fast unfolding of communities in large networks , Blondel, V.D. and Guillaume, J.L. and Lambiotte, R. and Lefebvre, E., Journal of Statistical Mechanics: Theory and Experiment, (2008), doi: <a href=”https://doi.org/10.1088/1742-5468/2008/10/P10008”>10.1088/1742-5468/2008/10/P10008</a>.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

An existing edge weight metric property. If it is not defined all edges have a weight of 1.0.

precision

float

0.000001

input

A given pass stops when the modularity is increased by less than precision. Default value is 0.000001

modularity

float

output

The computed modularity

#communities

int

output

The number of communities found

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Louvain', graph)

# set any input parameter value if needed
# params['metric'] = ...
# params['precision'] = ...
# params['modularity'] = ...
# params['#communities'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Louvain', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Louvain', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

MCL Clustering

Description

Nodes partitioning measure of Markov Cluster algorithm
used for community detection.This is an implementation of the MCL algorithm first published as:
Graph Clustering by Flow Simulation , Stijn van Dongen PhD Thesis, University of Utrecht (2000).

Parameters

name

type

default

direction

description

inflate

float

input

Determines the random walk length at each step.

weights

tlp.NumericProperty

input

Edge weights to use.

pruning

int

5

input

Determines, for each node, the number of strongest link kept at each iteration.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('MCL Clustering', graph)

# set any input parameter value if needed
# params['inflate'] = ...
# params['weights'] = ...
# params['pruning'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('MCL Clustering', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('MCL Clustering', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Node

Description

Computes the number of nodes in the subtree induced by each node.
The graph must be acyclic .

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Node', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Node', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Node', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Page Rank

Description

Nodes measure used for links analysis.
First designed by Larry Page and Sergey Brin, it is a link analysis algorithm that assigns a measure to each node of an ‘hyperlinked’ graph. It first appears in: The anatomy of a large-scale hypertextual Web search engine , Sergey Brin and Lawrence Page, Computer Networks and ISDN Systems Journal, vol. 30, number 1, pp 107-117 (1998), doi: <a href=”https://doi.org/10.1016/S0169-7552(98)00110-X”>10.1016/S0169-7552(98)00110-X</a>

Parameters

name

type

default

direction

description

d

float

0.85

input

Enables to choose a damping factor in ]0,1[.

directed

bool

True

input

Indicates if the graph should be considered as directed or not.

weight

tlp.NumericProperty

input

An existing edge weight metric property.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Page Rank', graph)

# set any input parameter value if needed
# params['d'] = ...
# params['directed'] = ...
# params['weight'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Page Rank', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Page Rank', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Path Length

Description

Assigns to each node the number of paths that goes through it.
The graph must be acyclic .

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Path Length', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Path Length', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Path Length', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Random metric

Description

Assigns random values to nodes and edges.

Parameters

name

type

default

direction

description

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Whether metric is computed only for nodes, only for edges, or for both.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Random metric', graph)

# set any input parameter value if needed
# params['target'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Random metric', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Random metric', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Second Order Centrality

Description

An implementation of the Second Order centrality measure first published as:
Kermarrec, A.-M., et al. (2011). “Second order centrality: Distributed assessment of nodes criticity in complex networks.” Computer Communications 34(5): 619-628,
doi: <a href=”https://dx.doi.org/10.1016/j.comcom.2010.06.007”>https://dx.doi.org/10.1016/j.comcom.2010.06.007</a>.

This algorithm computes the standard deviation of the return time on each node of a random walker. Central nodes are those with the lower values.

Parameters

name

type

default

direction

description

Selection

tlp.BooleanProperty

viewSelection

input

Boolean Property for choosing the starting node instead of choosing a node randomly if nothing is selected.

Debug mode

bool

False

input

Activate debug mode to get the vector of each time the walker pass through a node in a property called tickVector.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Second Order Centrality', graph)

# set any input parameter value if needed
# params['Selection'] = ...
# params['Debug mode'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Second Order Centrality', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Second Order Centrality', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Strahler

Description

Computes the Strahler numbers.This is an implementation of the Strahler numbers computation, first published as:
Hypsomic analysis of erosional topography , A.N. Strahler, Bulletin Geological Society of America 63,pages 1117-1142 (1952).
Extended to graphs in:
Using Strahler numbers for real time visual exploration of huge graphs , D. Auber, ICCVG, International Conference on Computer Vision and Graphics, pages 56-69 (2002)

Parameters

name

type

default

direction

description

All nodes

bool

False

input

If true, for each node the Strahler number is computed from a spanning tree having that node as root: complexity o(n^2). If false the Strahler number is computed from a spanning tree having the heuristicly estimated graph center as root.

Type

tlp.StringCollection

all

Values:
all
ramification
nested cycles

input

Sets the type of computation.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strahler', graph)

# set any input parameter value if needed
# params['All nodes'] = ...
# params['Type'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strahler', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strahler', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Strength

Description

Computes the Strength metric as described in
Software component capture using graph clustering , Y. Chiricota. F.Jourdan, an G.Melancon, IWPC (2002).

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strength', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Strength Clustering

Description

Implements a single-linkage clustering. The similarity measure used here is the Strength Metric computed on edges. The best threshold is found using MQ Quality Measure. See:
Software component capture using graph clustering , Y. Chiricota, F.Jourdan, and G. Melancon, IWPC ‘03: Proceedings of the 11th IEEE International Workshop on Program Comprehension

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

Metric used in order to multiply strength metric computed values.If one is given, the complexity is O(n log(n)), O(n) neither.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strength Clustering', graph)

# set any input parameter value if needed
# params['metric'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength Clustering', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength Clustering', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Strongly Connected Component

Description

Implements a strongly connected components decomposition.

Parameters

name

type

default

direction

description

#strongly connected components

int

output

Number of strongly components found

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strongly Connected Component', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strongly Connected Component', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strongly Connected Component', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Welsh & Powell

Description

Nodes coloring measure,
values assigned to adjacent nodes are always different.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Welsh & Powell', graph)

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Welsh & Powell', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Welsh & Powell', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Resizing

To call these plugins, you must use the tlp.Graph.applySizeAlgorithm() method. See also Calling a property algorithm on a graph for more details.

Auto Sizing

Description

Resize the nodes and edges of a graph so that the graph gets easy to read. The size of a node will depend on the number of its sons.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Auto Sizing', graph)

# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Auto Sizing', resultSize, params)

# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Auto Sizing', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Size Mapping

Description

Maps the size of the graph elements onto the values of a given numeric property.

Parameters

name

type

default

direction

description

property

tlp.NumericProperty

viewMetric

input

Input metric whose values will be mapped to sizes.

input

tlp.SizeProperty

viewSize

input

If not all dimensions (width, height, depth) are checked below, the dimensions not computed are copied from this property.

width

bool

True

input

Adjusts width (along x axis) to represent the chosen property. If not chosen, the dimension is copied from input.

height

bool

True

input

Adjusts height (along y axis) to represent the chosen property. If not chosen, the dimension is copied from input.

depth

bool

False

input

Adjusts depth (along z axis) to represent the chosen property. If not chosen, the dimension is copied from input.

min size

float

1

input

Gives the minimum value of the range of computed sizes.

max size

float

10

input

Gives the maximum value of the range of computed sizes.

type

tlp.StringCollection

linear

Values:
linear
uniform

input

Type of mapping.

  • linear mapping (min value of property is mapped to min size, max to max size, and a linear interpolation is used in between.)
  • uniform quantification (the values of property are sorted, and the same size increment is used between consecutive values).

target

tlp.StringCollection

nodes

Values:
nodes
edges

input

Whether sizes are computed for nodes or for edges.

area proportional

tlp.StringCollection

Area Proportional

Values:
Area Proportional
Quadratic/Cubic

input

The mapping can either be area/volume proportional, or square/cubic;i.e. the areas/volumes will be proportional, or the dimensions (width, height and depth) will be.

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Size Mapping', graph)

# set any input parameter value if needed
# params['property'] = ...
# params['input'] = ...
# params['width'] = ...
# params['height'] = ...
# params['depth'] = ...
# params['min size'] = ...
# params['max size'] = ...
# params['type'] = ...
# params['target'] = ...
# params['area proportional'] = ...

# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Size Mapping', resultSize, params)

# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Size Mapping', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Selection

To call these plugins, you must use the tlp.Graph.applyBooleanAlgorithm() method. See also Calling a property algorithm on a graph for more details.

Induced SubGraph

Description

Selects all the nodes/edges of the subgraph induced by a set of selected nodes.

Parameters

name

type

default

direction

description

Nodes

tlp.BooleanProperty

viewSelection

input

Set of nodes from which the induced subgraph is computed.

Use edges

bool

False

input

If true, source and target nodes of selected edges will also be added in the input set of nodes.

#edges selected

int

output

The number of newly selected edges

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Induced SubGraph', graph)

# set any input parameter value if needed
# params['Nodes'] = ...
# params['Use edges'] = ...
# params['#edges selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Induced SubGraph', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Induced SubGraph', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Kruskal

Description

Implements the classical Kruskal algorithm to select a minimum spanning tree in a connected graph.Only works on undirected graphs, (ie. the orientation of edges is omitted).

Parameters

name

type

default

direction

description

edge weight

tlp.NumericProperty

viewMetric

input

Metric containing the edge weights.

#edges selected

int

output

The number of newly selected edges

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Kruskal', graph)

# set any input parameter value if needed
# params['edge weight'] = ...
# params['#edges selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Kruskal', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Kruskal', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Loop Selection

Description

Selects loops in a graph.
A loop is an edge that has the same source and target.

Parameters

name

type

default

direction

description

#edges selected

int

output

The number of loops selected

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Loop Selection', graph)

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Loop Selection', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Loop Selection', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Make Selection a Graph

Description

Extends the selection to have a graph.
All selected edges of the current graph will have their extremities selected (no dangling edges).

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

The property indicating the selected elements

#elements selected

int

output

The number of graph elements (nodes + edges) selected

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Selection a Graph', graph)

# set any input parameter value if needed
# params['selection'] = ...
# params['#elements selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Make Selection a Graph', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Make Selection a Graph', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Multiple Edges Selection

Description

Selects the multiple or parallel edges of a graph.
Two edges are considered as parallel if they have the same source/origin and the same target/destination.If it exists n edges between two nodes, only n-1 edges will be selected.

Parameters

name

type

default

direction

description

directed

bool

False

input

Indicates if the graph should be considered as directed or not.

#edges selected

int

output

The number of multiple edges selected

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Multiple Edges Selection', graph)

# set any input parameter value if needed
# params['directed'] = ...
# params['#edges selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Reachable SubGraph

Description

Selects all nodes and edges at a given distance of a set of selected nodes.

Parameters

name

type

default

direction

description

edge direction

tlp.StringCollection

output edges

Values:
output edges: follow output edges (directed)
input edges : follow input edges (reverse-directed)
all edges : all edges (undirected)

input

This parameter defines the navigation direction.

starting nodes

tlp.BooleanProperty

viewSelection

input

This parameter defines the starting set of nodes used to walk in the graph.

distance

int

5

input

This parameter defines the maximal distance of reachable nodes.

#edges selected

int

output

The number of newly selected edges

#nodes selected

int

output

The number of newly selected nodes

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Reachable SubGraph', graph)

# set any input parameter value if needed
# params['edge direction'] = ...
# params['starting nodes'] = ...
# params['distance'] = ...
# params['#edges selected'] = ...
# params['#nodes selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Reachable SubGraph', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Reachable SubGraph', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Spanning Dag

Description

Selects an acyclic subgraph of a graph.

Parameters

name

type

default

direction

description

#edges selected

int

output

The number of ‘dag’ selected edges

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Spanning Dag', graph)

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Dag', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Spanning Dag', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary

Spanning Forest

Description

Selects a subgraph of a graph that is a forest (a set of trees).

Parameters

name

type

default

direction

description

#edges selected

int

output

The number of ‘tree’ selected edges

Calling the plugin from Python

To call that plugin from Python, use the following code snippet:

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Spanning Forest', graph)

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Forest', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Spanning Forest', params)

# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary