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 Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Biconnected

Description

Tests whether a graph is biconnected or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Connected

Description

Tests whether a graph is connected or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 floating point number 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 for that parameter:
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 Boolean True input If activated, set all edge shapes to Bézier curves.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 Boolean False input If true, a subgraph will be added for each computed simplex (a triangle in 2d, a tetrahedron in 3d).

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

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

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

Directed Tree

Description

Tests whether a graph is a directed tree or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Edge bundling

Description

Edges routing algorithm, implementing the intuitive Edge Bundling technique published in :
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).

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 Boolean False input If true, a subgraph corresponding to the grid used for routing edges will be added.
3D_layout Boolean False input If true, it is assumed that the input layout is in 3D and 3D edge bundling will be performed.
sphere_layout Boolean False input If true, it is assumed that nodes have originally been laid out on a sphere surface.Edges will be routed along the sphere surface. The 3D_layout parameter needs also to be set to true for that feature to work.
long_edges floating point number 0.9 input This parameter defines 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 floating point number 10 input This parameter defines the granularity of the grid that will be generated for routing edges. The higher its value, the more precise the grid is.
iterations unsigned integer 2 input This parameter defines the number of iterations of the edge bundling process. The higher its value, the more edges will be bundled.
max_thread unsigned integer 0 input This parameter defines 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 Boolean 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 dictionnary 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' dictionnary

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 for that parameter:
nodes
edges
input The type of graph elements to partition.
Connected Boolean 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 dictionnary 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' dictionnary

Free Tree

Description

Tests whether a graph is a free tree or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Hierarchical

Description

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

Calling the plugin from Python

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

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

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

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

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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Make Directed Tree

Description

Makes a graph a directed tree.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Make Simple

Description

Makes a graph simple.
A simple graph is an undirected graph with no loops and no multiple edges.

Calling the plugin from Python

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

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

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

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

Outer Planar

Description

Tests whether a graph is outer planar or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Planar

Description

Tests whether a graph is planar or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Planar Embedding

Description

Tests whether a graph is a planar embedding or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Quotient Clustering

Description

Computes a quotient sub-graph (meta-nodes pointing on sub-graphs) using an already existing sub-graphs hierarchy.

Parameters

name type default direction description
oriented Boolean True input If true, the graph is considered oriented.
node function tlp.StringCollection none

Values for that parameter:
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 for that parameter:
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 Boolean False input If true, the meta-node label is the same as the name of the subgraph it represents.
recursive Boolean False input If true, the algorithm is applied along the entire hierarchy of subgraphs.
layout quotient graph(s) Boolean False input If true, a force directed layout is computed for each quotient graph.
layout clusters Boolean False input If true, a force directed layout is computed for each cluster graph.
edge cardinality Boolean 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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Simple

Description

Tests whether a graph is simple or not.
A simple graph is an undirected graph with no loops and no multiple edges.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

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

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

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

Triconnected

Description

Tests whether a graph is triconnected or not.

Parameters

name type default direction description
result Boolean   output Whether the test succeed or not.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 Boolean False input If true, a subgraph will be added for each computed voronoi cell.
connect Boolean False input If true, existing graph nodes will be connected to the vertices of their voronoi cell.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

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

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

Coloring

To call these plugins, you must use the tlp.Graph.applyColorAlgorithm() method. See also for more details.

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 for that parameter:
linear
uniform
enumerated
logarithmic
input If linear or logarithmic, the input property must be a numeric property. For the linear case, 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. For the logarithmic case, 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.
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).
Finally, if enumerated, the input property can be of any type . Each possible value is mapped 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 for that parameter:
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 Boolean False input If true override the minimum value of the input property to keep coloring consistent across datasets.
minimum value floating point number   input That value will be used to override the minimum one of the input property.
override maximum value Boolean False input If true override the maximum value of the input property to keep coloring consistent across datasets.
maximum value floating point number   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 dictionnary 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' dictionnary

Export

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

GML Export

Description

Exports a Tulip graph in a file using the GML format (used by Graphlet).
See www.infosun.fmi.uni-passau.de/Graphlet/GML/ for details.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

JSON Export

Description

Exports a graph in a file using the Tulip JSON format

Parameters

name type default direction description
Beautify JSON string Boolean 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 dictionnary 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' dictionnary

SVG Export

Description

Exports a graph drawing in a SVG formatted file.

Parameters

name type default direction description
Edge color interpolation Boolean False input Indicates if edge color interpolation has to be used.
Edge size interpolation Boolean True input Indicates if edge size interpolation has to be used.
Edge extremities Boolean False input Indicates if edge extremities have to be exported.
Background color tlp.Color (255,255,255,255) input Specifies the background color of the SVG file.
Makes SVG output human readable Boolean 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 Boolean True input Specifies if node labels have to be exported.
Export edge labels Boolean False input Specifies if edge labels have to be exported.
Export metanode labels Boolean False input Specifies if node and edge labels inside metanodes have to be exported.
Use Web Open Font Format v2 Boolean 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 dictionnary 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['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' dictionnary

TLP Export

Description

Exports a graph in a file using the TLP format (Tulip Software Graph Format).
See tulip-software.org->Framework->TLP File Format for description.

Parameters

name type default direction description
name string   input Name of the graph being exported.
author string   input Authors
text::comments string 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 dictionnary 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' dictionnary

TLPB Export

Description

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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Complete General Graph

Description

Imports a new complete graph.

Parameters

name type default direction description
nodes unsigned integer 5 input Number of nodes in the final graph.
undirected Boolean True input If true, the generated graph is undirected. If false, 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 dictionnary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Complete General Graph')

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

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

Complete Tree

Description

Imports a new complete tree.

Parameters

name type default direction description
depth unsigned integer 5 input Depth of the tree.
degree unsigned integer 2 input The tree’s degree.
tree layout Boolean 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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

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 Boolean True input If true, also include hidden files.
follow symlinks Boolean True input If true, follow symlinks on Unix (including Mac OS X) or .lnk file on Windows.
icons Boolean True input If true, set icons as node shapes according to file mime types.
tree layout Boolean True input If true, apply the ‘Bubble Tree’ layout algorithm on the imported graph.
directory color tlp.Color (255, 255, 127, 128) input This parameter indicates the color used to display directories.
other color tlp.Color (85, 170, 255,128) 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 dictionnary 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' dictionnary

GEXF

Description

Imports a new graph from a file in the GEXF input format
as it is described in the XML Schema 1.2 draft (http://gexf.net/format/schema.html).
Dynamic mode is not yet supported.

Parameters

name type default direction description
filename file pathname   input This parameter defines the pathname of the GEXF file to import.
Curved edges Boolean 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 dictionnary 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' dictionnary

GML

Description

Imports a new graph from a file (.gml) in the GML input format (used by Graphlet).
See www.infosun.fmi.uni-passau.de/Graphlet/GML/ 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 dictionnary 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' dictionnary

Grid

Description

Imports a new grid structured graph.

Parameters

name type default direction description
width unsigned integer 10 input Grid node width.
height unsigned integer 10 input Grid node height.
connectivity tlp.StringCollection 4

Values for that parameter:
4
6
8
input Connectivity number of each node.
oppositeNodesConnected Boolean 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 floating point number 1.0 input Spacing between nodes.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Grid Approximation

Description

Imports a new grid approximation graph.

Parameters

name type default direction description
nodes unsigned integer 200 input Number of nodes in the final graph.
degree unsigned integer 10 input Average degree of the nodes in the final graph.
long edge Boolean 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 dictionnary 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' dictionnary

JSON Import

Description

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 dictionnary 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' dictionnary

Pajek

Description

Imports a new graph from a file (.net) in Pajek input format
as it is described in the Pajek manual ( http://pajek.imfm.si/lib/exe/fetch.php?media=dl:pajekman203.pdf )
from the Pajek wiki page http://pajek.imfm.si/doku.php?id=download .
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 dictionnary 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' dictionnary

Planar Graph

Description

Imports a new randomly generated planar graph.

Parameters

name type default direction description
nodes unsigned integer 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 dictionnary 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' dictionnary

Random General Graph

Description

Imports a new randomly generated graph.

Parameters

name type default direction description
nodes unsigned integer 500 input Number of nodes in the final graph.
edges unsigned integer 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 dictionnary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random General Graph')

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

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

Random General Tree

Description

Imports a new randomly generated tree.

Parameters

name type default direction description
Minimum size unsigned integer 10 input Minimal number of nodes in the tree.
Maximum size unsigned integer 100 input Maximal number of nodes in the tree.
Maximal node’s degree unsigned integer 5 input Maximal degree of the nodes.
tree layout Boolean 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 dictionnary 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' dictionnary

Random Simple Graph

Description

Imports a new randomly generated simple graph.

Parameters

name type default direction description
nodes unsigned integer 500 input Number of nodes in the final graph.
edges unsigned integer 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 dictionnary 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' dictionnary

TLP Import

Description

Imports a graph recorded in a file using the TLP format (Tulip Software Graph Format).
See tulip-software.org->Framework->TLP File Format 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 dictionnary 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' dictionnary

TLPB Import

Description

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 dictionnary 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' dictionnary

UCINET

Description

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

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 string 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 dictionnary 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' dictionnary

Uniform Random Binary Tree

Description

Imports a new randomly generated uniform binary tree.

Parameters

name type default direction description
Minimum size unsigned integer 50 input Minimal number of nodes in the tree.
Maximum size unsigned integer 60 input Maximal number of nodes in the tree.
tree layout Boolean 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 dictionnary 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' dictionnary

Web Site

Description

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

Parameters

name type default direction description
server string 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 string   input This parameter defines the first web page to visit. No need for / at the beginning.
max size integer 1000 input This parameter defines the maximum number of nodes (different pages) allowed in the extracted graph.
non http links Boolean False input This parameter indicates if non http links (https, ftp, mailto...) have to be extracted.
other server Boolean False input This parameter indicates if links or redirection to other server pages have to be followed.
compute layout Boolean 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 dictionnary 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' dictionnary

graphviz

Description

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

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 dictionnary 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' dictionnary

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 Boolean True input Sets labels on nodes.
edges Boolean True input Set labels on edges.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Balloon (OGDF)

Description

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

Parameters

name type default direction description
Even angles Boolean 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 dictionnary 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' dictionnary

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 Boolean False input Sets impred option.
iterno integer 20 input The number of iterations. If 0, the number of iterations will be set as 10 times the number of nodes.
reqlength floating point number 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 dictionnary 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' dictionnary

Bubble Tree

Description

Implement the bubble tree drawing algorithm first published as:
Bubble Tree Drawing Algorithm , D. Auber and S. Grivet and J-P Domenger and Guy Melancon, ICCVG, pages 633-641 (2004).

Parameters

name type default direction description
node size tlp.SizeProperty viewSize input This parameter defines the property used for node sizes.
complexity Boolean 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 dictionnary 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' dictionnary

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 Boolean 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 dictionnary 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' dictionnary

Circular (OGDF)

Description

Implements a circular layout.

Parameters

name type default direction description
minDistCircle floating point number 20 input The minimal distance between nodes on a circle.
minDistLevel floating point number 20 input The minimal distance between father and child circle.
minDistSibling floating point number 10 input The minimal distance between circles on same level.
minDistCC floating point number 20 input The minimal distance between connected components.
pageRatio floating point number 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 dictionnary 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' dictionnary

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).

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 for that parameter:
vertical
horizontal
input This parameter enables to choose the orientation of the drawing.
space between levels floating point number 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 dictionnary 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' dictionnary

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 for that parameter:
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 dictionnary 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' dictionnary

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, Graph Drawing ‘01 Revised Papers from the 9th International Symposium on Graph Drawing.

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 unsigned integer 1 input The minimum margin between each pair of nodes in the resulting packed layout.
increment unsigned integer 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 dictionnary 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' dictionnary

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 for that parameter:
Standard
Repulse
Planar
input Easy way to set fixed costs.
Speed tlp.StringCollection Fast

Values for that parameter:
Fast
Medium
HQ
input Easy way to set temperature and number of iterations.
preferredEdgeLength floating point number 0.0 input The preferred edge length.
preferredEdgeLengthMultiplier floating point number 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 dictionnary 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' dictionnary

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 for that parameter:
up to down
down to up
right to left
left to right
input Choose a desired orientation.
layer spacing floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
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 dictionnary 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' dictionnary

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 integer 1 input The minimum grid distance.
transpose Boolean 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 dictionnary 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' dictionnary

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 floating point number 10.0 input The unit edge length.
New initial placement Boolean True input Indicates the initial placement before running algorithm.
Fixed iterations integer 30 input The fixed number of iterations for the stop criterion.
Threshold floating point number 0.01 input The threshold for the stop criterion.
Page Format tlp.StringCollection Square

Values for that parameter:
Portrait (A4 portrait page)
Landscape (A4 landscape page)
Square (Square format)
input Possible page formats.
Quality vs Speed tlp.StringCollection BeautifulAndFast

Values for that parameter:
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 for that parameter:
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 for that parameter:
All
Integer
Exponent
input Specifies which positions for a node are allowed.
Tip Over tlp.StringCollection NoGrowingRow

Values for that parameter:
None
NoGrowingRow
Always
input Specifies in which case it is allowed to tip over drawings of connected components.
Pre Sort tlp.StringCollection DecreasingHeight

Values for that parameter:
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 for that parameter:
UniformProb
NonUniformProbLowerMass
NonUniformProbHigherMass
input Specifies how sun nodes of galaxies are selected.
Max Iter Change tlp.StringCollection LinearlyDecreasing

Values for that parameter:
Constant
LinearlyDecreasing
RapidlyDecreasing
input Specifies how MaxIterations is changed in subsequent multilevels.
Initial Placement Mult tlp.StringCollection Advanced

Values for that parameter:
Simple
Advanced
input Specifies how the initial placement is generated.
Force Model tlp.StringCollection New

Values for that parameter:
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 for that parameter:
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 for that parameter:
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 for that parameter:
PathByPath
SubtreeBySubtree
input Specifies how the reduced bucket quadtree is constructed.
Smallest Cell Finding tlp.StringCollection Iteratively

Values for that parameter:
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 dictionnary 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' dictionnary

Fast Multipole Embedder (OGDF)

Description

Implements the fast multipole embedder layout algorithm of Martin Gronemann.

Parameters

name type default direction description
number of iterations integer 100 input The maximum number of iterations.
number of coefficients integer 5 input The number of coefficients for the expansions.
randomize layout Boolean True input If true, the initial layout will be randomized.
default node size floating point number 20.0 input The default node size.
default edge length floating point number 1.0 input The default edge length.
number of threads integer 3 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 dictionnary 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' dictionnary

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 integer 2 input The number of threads to use during the computation of the layout.
multilevel nodes bound integer 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 dictionnary 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' dictionnary

Fast Overlap Removal

Description

Implements a layout algorithm removing the nodes overlaps. It was first published as:
Fast Node Overlap Removal , Tim Dwyer, Kim Marriot, Peter J. Stuckey, Graph Drawing, Vol. 3843 (2006), pp. 153-164.

Parameters

name type default direction description
overlap removal type tlp.StringCollection X-Y

Values for that parameter:
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 integer 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 floating point number 0.0 input The minimal x border value that will separate the graph nodes after application of the algorithm.
y border floating point number 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 dictionnary 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' dictionnary

Frutcherman 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 integer 1000 input The number of iterations.
noise Boolean True input Sets the parameter noise.
use node weights Boolean 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 for that parameter:
Factor
Logarithmic
input Sets the parameter cooling function
ideal edge length floating point number 10.0 input The ideal edge length.
minDistCC floating point number 20.0 input The minimal distance between connected components.
pageRatio floating point number 1.0 input The page ratio used for packing connected components.
check convergence Boolean True input Indicates if the convergence has to be checked.
convergence tolerance floating point number 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 dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Frutcherman 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('Frutcherman Reingold (OGDF)', resultLayout, params)

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

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

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).

Parameters

name type default direction description
3D layout Boolean 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 unsigned integer 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 dictionnary 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' dictionnary

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 integer 30000 input The maximal number of rounds per node.
minimal temperature floating point number 0.005 input The minimal temperature.
initial temperature floating point number 12.0 input The initial temperature to x; must be >= minimalTemperature.
gravitational constant floating point number 0.0625 input Gravitational constant parameter.
desired length floating point number 5.0 input The desired edge length to x; must be >= 0.
maximal disturbance floating point number 0.0 input The maximal disturbance to x; must be >= 0.
rotation angle floating point number 1.04719755 input The opening angle for rotations to x (0 <= x <= pi / 2).
oscillation angle floating point number 1.57079633 input Sets the opening angle for oscillations to x (0 <= x <= pi / 2).
rotation sensitivity floating point number 0.01 input The rotation sensitivity to x (0 <= x <= 1).
oscillation sensitivity floating point number 0.3 input The oscillation sensitivity to x (0 <= x <= 1).
Attraction formula tlp.StringCollection Fruchterman/Reingold

Values for that parameter:
Fruchterman/Reingold
GEM
input The formula for attraction.
minDistCC floating point number 20 input The minimal distance between connected components.
pageRatio floating point number 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 dictionnary 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' dictionnary

GRIP

Description

Implements a force directed graph drawing algorithm first published as:
GRIP: Graph dRawing with Intelligent Placement , P. Gajer and S.G. Kobourov, Journal Graph Algorithm and Applications, vol. 6, no. 3, pages 203–224, (2002).

Parameters

name type default direction description
3D layout Boolean 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 dictionnary 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' dictionnary

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 for that parameter:
horizontal
vertical
input This parameter enables to choose the orientation of the drawing.
layer spacing floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
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 dictionnary 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' dictionnary

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).

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 for that parameter:
vertical
horizontal
input This parameter enables to choose the orientation of the drawing.
orthogonal Boolean True input This parameter enables to choose if the tree is drawn orthogonally or not.
layer spacing floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
input This parameter enables to set up the minimum space between two nodes in the same layer.
bounding circles Boolean False input Indicates if the node bounding objects are boxes or bounding circles.
compact layout Boolean 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 dictionnary 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' dictionnary

Improved Walker

Description

It is a linear implementation of the Walker’s tree layout improved algorithm described in
Improving Walker’s Algorithm to Run in Linear Time , Christoph Buchheim and Michael Junger and Sebastian Leipert (2002).

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 for that parameter:
up to down
down to up
right to left
left to right
input Choose a desired orientation.
orthogonal Boolean False input If true then use orthogonal edges.
layer spacing floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
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 dictionnary 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' dictionnary

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 floating point number 20 input The minimal required horizontal distance between siblings.
subtrees distance floating point number 20 input The minimal required horizontal distance between subtrees.
levels distance floating point number 50 input The minimal required vertical distance between levels.
trees distance floating point number 50 input The minimal required horizontal distance between trees in the forest.
orthogonal layout Boolean False input Indicates whether orthogonal edge routing style is used or not.
Orientation tlp.StringCollection topToBottom

Values for that parameter:
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 rootIsSource

Values for that parameter:
rootIsSource (Select a source in the graph)
rootIsSink (Select a sink in the graph)
rootByCoord (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 dictionnary 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' dictionnary

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 floating point number 0.001 input The value for the stop tolerance, below which the system is regarded stable (balanced) and the optimization stopped.
used layout Boolean True input If set to true, the given layout is used for the initial positions.
zero length floating point number 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 floating point number 0 input The desirable edge length.
compute max iterations Boolean True input If set to true, the number of iterations is computed depending on G.
global iterations integer 50 input The number of global iterations.
local iterations integer 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 dictionnary 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' dictionnary

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.

Parameters

name type default direction description
3D layout Boolean False input If true the layout is in 3D else it is computed in 2D
octtree Boolean 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 unsigned integer 100 input This parameter allows to limit the number of iterations. The value of 0 corresponds to a default value of 100.
repulsion exponent floating point number 0.0 input This parameter allows to set the exponent of attraction.
attraction exponent floating point number 1.0 input This parameter allows to set the exponent of repulsion.
gravitation factor floating point number 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 dictionnary 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' dictionnary

MMM Example Fast Layout (OGDF)

Description

Implements a fast multilevel graph layout using the OGDF modular multilevel-mixer. SolarMerger and SolarPlacer are used as merging and placement strategies.

Calling the plugin from Python

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

# get a dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('MMM Example Fast Layout (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('MMM Example Fast Layout (OGDF)', resultLayout, params)

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

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

MMM Example Nice Layout (OGDF)

Description

Implements a nice multilevel graph layout using the OGDF modular multilevel-mixer. EdgeCoverMerger and BarycenterPlacer are used as merging and placement strategies.

Calling the plugin from Python

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

# get a dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('MMM Example Nice Layout (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('MMM Example Nice Layout (OGDF)', resultLayout, params)

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

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

MMM Example No Twist Layout (OGDF)

Description

Implements a multilevel graph layout with using the OGDF modular multilevel-mixer. It is tuned to reduce twists in the final drawing and uses LocalBiconnectedMerger and BarycenterPlacer as merging and placement strategies.

Calling the plugin from Python

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

# get a dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('MMM Example No Twist Layout (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('MMM Example No Twist Layout (OGDF)', resultLayout, params)

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

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

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 (1998).

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 for that parameter:
vertical
horizontal
input This parameter enables to choose the orientation of the drawing.
y node-node spacing floating point number 2 input This parameter defines the minimum y-spacing between any two nodes.
x node-node and edge-node spacing floating point number 2 input This parameter defines the minimum x-spacing between any two nodes or between a node and an edge.
node shape tlp.IntegerProperty viewShape output This parameter defines the property holding node shapes.

Calling the plugin from Python

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

# get a dictionnary 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['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('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' dictionnary

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.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

Pivot MDS (OGDF)

Description

By setting the number of pivots to infinity this algorithm behaves just like classical MDS. See Brandes and Pich: Eigensolver methods for progressive multidimensional scaling of large data.

Parameters

name type default direction description
number of pivots integer 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 Boolean False input Sets if the edge costs attribute has to be used.
edge costs floating point number 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 dictionnary 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' dictionnary

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 floating point number 1.1 input Sets the option pageRatio.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

Planarization Layout (OGDF)

Description

The planarization approach for drawing graphs.

Parameters

name type default direction description
page ratio floating point number 1.1 input Sets the option page ratio.
Embedder tlp.StringCollection SimpleEmbedder

Values for that parameter:
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)
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.

Calling the plugin from Python

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

# get a dictionnary 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['Embedder'] = ...

# 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' dictionnary

Random layout

Description

The positions of the graph nodes are randomly selected.

Parameters

name type default direction description
3D layout Boolean 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 dictionnary 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' dictionnary

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 floating point number
input This parameter enables to set up the aspect ratio (height/width) for the rectangle corresponding to the root node.
Treemap Type Boolean 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 dictionnary 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' dictionnary

Stress Majorization (OGDF)

Description

Implements an alternative to force-directed layout which is a distance-based layout realized by the stress majorization approach.

Parameters

name type default direction description
terminationCriterion tlp.StringCollection None

Values for that parameter:
None
PositionDifference
Stress
input Tells which TERMINATION_CRITERIA should be used.
fixXCoordinates Boolean False input Tells whether the x coordinates are allowed to be modified or not.
fixYCoordinates Boolean False input Tells whether the y coordinates are allowed to be modified or not.
hasInitialLayout Boolean False input Tells whether the current layout should be used or the initial layout needs to be computed.
layoutComponentsSeparately Boolean False input Sets whether the graph components should be layouted separately or a dummy distance should be used for nodes within different components.
numberOfIterations integer 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 floating point number 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 Boolean 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 dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Stress Majorization (OGDF)', graph)

# set any input parameter value if needed
# params['terminationCriterion'] = ...
# params['fixXCoordinates'] = ...
# params['fixYCoordinates'] = ...
# 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 Majorization (OGDF)', resultLayout, params)

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

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

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 integer 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 integer 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 floating point number 3 input The minimal horizontal distance between two nodes on the same layer.
layer distance floating point number 3 input The minimal vertical distance between two nodes on neighboring layers.
fixed layer distance Boolean False input If true, the distance between neighboring layers is fixed, otherwise variable (only for FastHierarchyLayout).
transpose Boolean 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 Boolean True input If set to true connected components are laid out separately and the resulting layouts are arranged afterwards using the packer module.
minDistCC floating point number 20 input Specifies the spacing between connected components of the graph.
pageRatio floating point number 1.0 input The page ratio used for packing connected components.
alignBaseClasses Boolean False input Determines if base classes of inheritance hierarchies shall be aligned.
alignSiblings Boolean False input Sets the option alignSiblings.
Ranking tlp.StringCollection LongestPathRanking

Values for that parameter:
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 for that parameter:
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 for that parameter:
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 Boolean True input Transpose the layout vertically from top to bottom.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

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 dictionnary 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' dictionnary

Tree Leaf

Description

Implements a simple level-based tree layout.

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 for that parameter:
up to down
down to up
right to left
left to right
input Choose a desired orientation.
uniform layer spacing Boolean True input If the layer spacing is uniform, the spacing between two consecutive layers will be the same.
layer spacing floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
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 dictionnary 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' dictionnary

Tree Radial

Description

Implements the radial tree layout algorithm first published as:
T. J. Jankun-Kelly, Kwan-Liu Ma MoireGraphs: Radial Focus+Context Visualization and Interaction for Graphs with Visual Nodes 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 floating point number
input This parameter enables to set up the minimum space between two layers in the drawing.
node spacing floating point number
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 dictionnary 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' dictionnary

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 Boolean 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 dictionnary 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'] = ...

# 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' dictionnary

Visibility (OGDF)

Description

Implements a simple upward drawing algorithm based on visibility representations (horizontal segments for nodes, vectical segments for edges).

Parameters

name type default direction description
minimum grid distance integer 1 input The minimum grid distance.
transpose Boolean 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 dictionnary 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' dictionnary

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 betweenness centrality.

Parameters

name type default direction description
directed Boolean False input Indicates if the graph should be considered as directed or not.
norm Boolean 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)

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

Biconnected Component

Description

Implements a biconnected component decomposition.It assigns the same value to all the edges in the same component.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Cluster

Description

Computes the Cluster metric as described in
Software component capture using graph clustering , Y. Chiricota. F.Jourdan, an G.Melancon, IWPC (2002).

Parameters

name type default direction description
depth unsigned integer 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 dictionnary 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' dictionnary

Connected Component

Description

Implements the connected component decompostion.Each node and edge that belongs to the same component receives the same value.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Convolution

Description

Discretization and filtering of the distribution of a node metric using a convolution.

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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Degree

Description

Assigns its degree to each node.

Parameters

name type default direction description
type tlp.StringCollection InOut

Values for that parameter:
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 Boolean 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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

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 Boolean False input If true, the closeness centrality is computed (i.e. the average distance from a node to all others).
norm Boolean 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 sould be computed on a (strongly) connected graph.
directed Boolean False input If true, the graph is considered directed.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

Id

Description

Assigns their Tulip id to nodes and edges.

Parameters

name type default direction description
target tlp.StringCollection both

Values for that parameter:
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 dictionnary 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' dictionnary

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).
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 for that parameter:
InOut
In
Out
input This parameter indicates the direction used to compute K-Cores values.
metric tlp.NumericProperty   input An existing edge metric property.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Louvain

Description

Nodes partitioning measure used for community detection.This is an implementation of the Louvain clustering algorithm first published as:
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, P10008 (2008).

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 floating point number 0.000001 input A given pass stops when the modularity is increased by less than precision. Default value is 0.000001

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

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 floating point number
input Determines the random walk length at each step.
weights tlp.NumericProperty   input Edge weights to use.
pruning unsigned integer 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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

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.

Parameters

name type default direction description
d floating point number 0.85 input Enables to choose a damping factor in ]0,1[.
directed Boolean True 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 dictionnary 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'] = ...

# 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' dictionnary

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 dictionnary 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' dictionnary

Random metric

Description

Assigns random values to nodes and edges.

Parameters

name type default direction description
target tlp.StringCollection both

Values for that parameter:
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 dictionnary 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' dictionnary

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 Boolean 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 for that parameter:
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 dictionnary 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' dictionnary

Strength

Description

Computes the Strength metric 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 dictionnary 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' dictionnary

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, an G.Melancon, IWPC (2002).

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 dictionnary 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' dictionnary

Strongly Connected Component

Description

Implements a strongly connected components decomposition.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

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 dictionnary 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' dictionnary

Size Mapping

Description

Maps the sizes 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 Boolean True input Each checked dimension is adjusted to represent property, each unchecked dimension is copied from input.
height Boolean True input Each checked dimension is adjusted to represent property, each unchecked dimension is copied from input.
depth Boolean False input Each checked dimension is adjusted to represent property, each unchecked dimension is copied from input.
min size floating point number 1 input Gives the minimum value of the range of computed sizes.
max size floating point number 10 input Gives the maximum value of the range of computed sizes.
type Boolean True input Type of mapping.
  • true: linear mapping (min value of property is mapped to min size, max to max size, and a linear interpolation is used in between.)
  • false: uniform quantification (the values of property are sorted, and the same size increment is used between consecutive values).
node/edge Boolean True input If true the algorithm will compute the size of nodes else it will compute the size of edges:
  • true: node size
  • false: edge size
area proportional tlp.StringCollection Area Proportional

Values for that parameter:
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 dictionnary 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['node/edge'] = ...
# 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' dictionnary

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 Sub-Graph

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 sub-graph is computed.
Use edges Boolean False input If true, source and target nodes of selected edges will also be added in the input set of nodes.

Calling the plugin from Python

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

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

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

# 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 Sub-Graph', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Induced Sub-Graph', params)

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

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.

Calling the plugin from Python

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

# get a dictionnary 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'] = ...

# 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' dictionnary

Loop Selection

Description

Selects loops in a graph.
A loop is an edge that has the same source and target.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

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.

Calling the plugin from Python

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

# get a dictionnary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Multiple Edges 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('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' dictionnary

Reachable Sub-Graph

Description

Selects all nodes and edges at a maximum distance of 1 of the node of a given set of selected nodes.

Parameters

name type default direction description
edges direction tlp.StringCollection output edges

Values for that parameter:
output edges : follow ouput 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 integer 5 input This parameter defines the maximal distance of reachable nodes.

Calling the plugin from Python

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

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

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

# 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 Sub-Graph', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Reachable Sub-Graph', params)

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

Spanning Dag

Description

Selects an acyclic subgraph of a graph.

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary

Spanning Forest

Description

Selects a subgraph of a graph that is a forest (a set of trees).

Calling the plugin from Python

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

# get a dictionnary 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' dictionnary