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 through the classical Python interpreter, some plugins (Color Mapping, Convolution Clustering, File System Directory, GEXF, SVG Export, Website) require the tulipgui module to be imported before they can be called as they use Qt under the hood.

Algorithm

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

Acyclic

Description

Tests whether a graph is acyclic or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Biconnected

Description

Tests whether a graph is biconnected or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Bidirectional Edges

Description

When there are two weighted inverse edges between two nodes (one in each direction), called bidirectional edges, by default Tulip draw them one on top of the other. This plugin allows to compute and display only a ratio of their length based on the edge weight to enhance the visualization. The ratio of the length to display is computed by divided the weight of one edge by the sum of the weights of both edges. The ratio of the second edge is simply computed by 1 minus the ratio of the first edge.
Warning : the computation will failed if the ratios are not into [0, 1].

Do not forget to display edges extremities. They will be displayed at a distance proportional to the computed length ratio. This plugin works only for edges without bends and when there are only two inverse edges between a pair of nodes.

Parameters

name

type

default

direction

description

edge weight

tlp.NumericProperty

viewMetric

input

#bidirectional edges

int

0

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['edge weight'] = ...
# params['#bidirectional edges'] = ...

success = graph.applyAlgorithm('Bidirectional Edges', params)

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

Connected

Description

Tests whether a graph is connected or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Curve edges

Description

Computes quadratic or cubic bezier paths for edges

Parameters

name

type

default

direction

description

initial layout

tlp.LayoutProperty

viewLayout

input

curve roundness

float

0.5

input

curve type

tlp.StringCollection

quadratic continuous

Values:
quadratic continuous
quadratic discrete
quadratic diagonal cross
quadratic straight cross
quadratic horizontal
quadratic vertical
cubic continuous
cubic vertical
cubic diagonal cross
cubic vertical diagonal cross
cubic straight cross source
cubic straight cross target

input

bezier edges

bool

True

input

Calling the plugin from Python

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

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

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

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

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

Delaunay triangulation

Description

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

Parameters

name

type

default

direction

description

simplices

bool

False

input

original clone

bool

True

input

Calling the plugin from Python

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

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

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

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

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

Directed Tree

Description

Tests whether a graph is a directed tree or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Edge bundling

Description

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

Parameters

name

type

default

direction

description

initial layout

tlp.LayoutProperty

viewLayout

input

node size

tlp.SizeProperty

viewSize

input

grid graph

bool

False

input

3D layout

bool

False

input

sphere layout

bool

False

input

long edges

float

0.9

input

split ratio

float

10

input

iterations

int

2

input

max thread

int

0

input

edge node overlap

bool

False

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['initial layout'] = ...
# params['node size'] = ...
# params['grid graph'] = ...
# params['3D layout'] = ...
# params['sphere layout'] = ...
# params['long edges'] = ...
# params['split ratio'] = ...
# params['iterations'] = ...
# params['max thread'] = ...
# params['edge node overlap'] = ...

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

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

Equal Value

Description

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

Parameters

name

type

default

direction

description

property

tlp.PropertyInterface

viewMetric

input

type

tlp.StringCollection

nodes

Values:
nodes
edges

input

connected

bool

False

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['property'] = ...
# params['type'] = ...
# params['connected'] = ...

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

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

Free Tree

Description

Tests whether a graph is a free tree or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Graph

Description

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

Parameters

name

type

default

direction

description

result

bool

output

selection

tlp.BooleanProperty

viewSelection

input

Calling the plugin from Python

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

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

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

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

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

H3 Layout Helper

Description

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

Parameters

name

type

default

direction

description

layout scaling

float

1000

input

Calling the plugin from Python

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

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

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

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

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

Hierarchical

Description

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

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

Calling the plugin from Python

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

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

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

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

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

Make Acyclic

Description

Makes a graph acyclic.

Calling the plugin from Python

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

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

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

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

Make Biconnected

Description

Makes a graph biconnected.

Calling the plugin from Python

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

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

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

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

Make Connected

Description

Makes a graph connected.

Calling the plugin from Python

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

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

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

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

Make Directed Tree

Description

Makes a free tree a directed tree.

Calling the plugin from Python

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

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

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

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

Make Planar Embedding

Description

Makes the graph a planar embedding if it is planar.

Calling the plugin from Python

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

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

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

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

Make Simple

Description

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

Parameters

name

type

default

direction

description

directed

bool

False

input

Calling the plugin from Python

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

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

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

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

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

Maximal Cliques Enumeration

Description

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

Parameters

name

type

default

direction

description

min size

int

0

input

#cliques created

int

output

Calling the plugin from Python

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

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

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

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

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

Outer Planar

Description

Tests whether a graph is outer planar or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Planar

Description

Tests whether a graph is planar or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Planar Embedding

Description

Tests whether a graph is a planar embedding or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Quotient Clustering

Description

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

Parameters

name

type

default

direction

description

directed

bool

True

input

node function

tlp.StringCollection

none

Values:
none
average
sum
max
min

input

edge function

tlp.StringCollection

none

Values:
none
average
sum
max
min

input

meta-node label

tlp.StringProperty

input

use name of subgraph

bool

False

input

recursive

bool

False

input

layout quotient graph(s)

bool

False

input

layout clusters

bool

False

input

edge cardinality

bool

False

input

Calling the plugin from Python

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

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

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

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

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

Reverse edges

Description

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

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

Calling the plugin from Python

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

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

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

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

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

Simple

Description

Tests whether a graph is simple or not.
An directed/undirected graph is simple if it has no self loops (no edges with the same node as source and target node) and no multiple edges (no more than one edge between any ordered pair of nodes).

Parameters

name

type

default

direction

description

result

bool

output

directed

bool

False

input

check loops

bool

True

input

check multiple edges

bool

True

input

#self loops

int

0

output

#multiple edges

int

0

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['result'] = ...
# params['directed'] = ...
# params['check loops'] = ...
# params['check multiple edges'] = ...
# params['#self loops'] = ...
# params['#multiple edges'] = ...

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

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

Squarified Tree Map Helper

Description

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

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

aspect ratio

float

1

input

treemap type

bool

False

input

border color

tlp.Color

(255, 255, 255, 255)

input

layout

tlp.LayoutProperty

viewLayout

output

sizes

tlp.SizeProperty

viewSize

output

shapes

tlp.IntegerProperty

viewShape

output

colors

tlp.ColorProperty

viewColor

output

border colors

tlp.ColorProperty

viewBorderColor

output

border widths

tlp.DoubleProperty

viewBorderWidth

output

Calling the plugin from Python

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

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

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

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

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

Triconnected

Description

Tests whether a graph is triconnected or not.

Parameters

name

type

default

direction

description

result

bool

output

Calling the plugin from Python

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

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

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

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

Voronoi diagram

Description

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

Parameters

name

type

default

direction

description

voronoi cells

bool

False

input

connect

bool

False

input

original clone

bool

True

input

Calling the plugin from Python

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

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

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

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

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

Coloring

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

Alpha Mapping

Description

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

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

target

tlp.StringCollection

nodes

input

type

tlp.StringCollection

linear

input

min alpha

int

0

input

max alpha

int

255

input

Calling the plugin from Python

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

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

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

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

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

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

Color Mapping

Description

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

Parameters

name

type

default

direction

description

type

tlp.StringCollection

linear

Values:
linear
uniform
enumerated
logarithmic

input

property

tlp.PropertyInterface

viewMetric

input

target

tlp.StringCollection

nodes

Values:
nodes
edges

input

color scale

tlp.ColorScale

input

override min value

bool

False

input

min value

float

input

override max value

bool

False

input

max value

float

input

Calling the plugin from Python

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

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

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

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

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

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

Export

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

CSV Export

Description

Supported extensions: csv

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

Parameters

name

type

default

direction

description

type of elements

tlp.StringCollection

nodes

input

selection

tlp.BooleanProperty

input

export nodes ids

bool

False

input

exported properties

PropertiesCollection

the user defined properties

input

field separator

tlp.StringCollection

input

custom separator

str

;

input

string delimiter

tlp.StringCollection

input

decimal mark

tlp.StringCollection

.

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['type of elements'] = ...
# params['selection'] = ...
# params['export nodes ids'] = ...
# params['exported properties'] = ...
# params['field separator'] = ...
# params['custom separator'] = ...
# params['string delimiter'] = ...
# params['decimal mark'] = ...

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

GML Export

Description

Supported extensions: gml

Exports a Tulip graph in a file using the GML format (used by Graphlet).
See:
https://github.com/GunterMueller/UNI_PASSAU_FMI_Graph_Drawing
(formerly www.infosun.fim.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 dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GML Export', graph)

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

JSON Export

Description

Supported extensions: json

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

Parameters

name

type

default

direction

description

Beautify JSON string

bool

False

input

Calling the plugin from Python

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

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

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

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

SVG Export

Description

Supported extensions: svg, svgz (compressed svg).

Exports a graph visualization in a SVG formatted file.

Parameters

name

type

default

direction

description

edge color interpolation

bool

False

input

edge size interpolation

bool

True

input

edge extremities

bool

False

input

background color

tlp.Color

(255,255,255,255)

input

no background

bool

False

input

makes SVG output human readable

bool

True

input

export node labels

bool

True

input

export edge labels

bool

False

input

export metanode labels

bool

False

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['edge color interpolation'] = ...
# params['edge size interpolation'] = ...
# params['edge extremities'] = ...
# params['background color'] = ...
# params['no background'] = ...
# params['makes SVG output human readable'] = ...
# params['export node labels'] = ...
# params['export edge labels'] = ...
# params['export metanode labels'] = ...

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

TLP Export

Description

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

Exports a graph in a file using the TLP format (Tulip Software Graph Format).
See TLP File Format for more details.

Parameters

name

type

default

direction

description

name

str

input

author

str

input

text::comments

str

This file was generated by Tulip.

input

Calling the plugin from Python

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

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

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

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

TLPB Export

Description

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

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

Calling the plugin from Python

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

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

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

Import

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

Adjacency Matrix

Description

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

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Adjacency Matrix')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Adjacency Matrix', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Adjacency Matrix', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Adjacency Matrix', params, graph)

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

Attract And Introduce Model

Description

Randomly generates a graph using the Attract and Introduce Model described in
J. H. Fowler, C. T. Dawes, N. A. Christakis.
Model of genetic variation in human social networks.
PNAS 106 (6): 1720-1724, 2009. doi: 10.1073/pnas.0806746106

Parameters

name

type

default

direction

description

nodes

int

750

input

edges

int

3150

input

alpha

float

0.9

input

beta

float

0.3

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Attract And Introduce Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Attract And Introduce Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Attract And Introduce Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Attract And Introduce Model', params, graph)

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

BibTeX

Description

File extension: bib

Imports a co-authorship graph from a BibTeX file.

Parameters

name

type

default

direction

description

filename

file pathname

input

Nodes to import

tlp.StringCollection

Authors

input

One edge per publication

bool

True

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('BibTeX')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('BibTeX', graph)

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

# import in a newly created graph
graph = tlp.importGraph('BibTeX', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('BibTeX', params, graph)

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

Bollobas et al. Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

2000

input

min degree

int

4

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Bollobas et al. Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Bollobas et al. Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Bollobas et al. Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Bollobas et al. Model', params, graph)

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

Bu Wang Zhou Model

Description

Randomly generates a scale-free graph using the model described in
Shouliang Bu, Bing-Hong Wang, Tao Zhou.
Gaining scale-free and high clustering complex networks.
Physica A, 374, 864–868, 2007. doi: https://doi.org/10.1016/j.physa.2006.08.048

Parameters

name

type

default

direction

description

nodes

int

200

input

nodes types

int

3

input

m

int

2

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Bu Wang Zhou Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Bu Wang Zhou Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Bu Wang Zhou Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Bu Wang Zhou Model', params, graph)

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

CMake dependencies graph

Description

Import the targets dependencies graph of a CMake project

Parameters

name

type

default

direction

description

CMake project source dir

directory pathname

input

CMake executable

file pathname

cmake

input

CMake parameters

str

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('CMake dependencies graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('CMake dependencies graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('CMake dependencies graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('CMake dependencies graph', params, graph)

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

Catanzaro and al. Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

m

int

5

input

p

float

0.5

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Catanzaro and al. Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Catanzaro and al. Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Catanzaro and al. Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Catanzaro and al. Model', params, graph)

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

Complete General Graph

Description

Imports a new complete graph.

Parameters

name

type

default

direction

description

nodes

int

5

input

directed

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Complete General Graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Complete General Graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Complete General Graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Complete General Graph', params, graph)

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

Complete Tree

Description

Imports a new complete tree.

Parameters

name

type

default

direction

description

depth

int

5

input

degree

int

2

input

tree layout

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Complete Tree')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Complete Tree', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Complete Tree', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Complete Tree', params, graph)

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

Empty graph

Description

A no-op plugin to import an empty graph

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Empty graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Empty graph', graph)

# import in a newly created graph
graph = tlp.importGraph('Empty graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Empty graph', params, graph)

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

Erdős-Rényi Random Graph

Description

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

Parameters

name

type

default

direction

description

nodes

int

50

input

p

float

0.01

input

self loops

bool

False

input

directed

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Erdős-Rényi Random Graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Erdős-Rényi Random Graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Erdős-Rényi Random Graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Erdős-Rényi Random Graph', params, graph)

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

File System Directory

Description

Imports a tree representation of a file system directory.

Parameters

name

type

default

direction

description

directory

directory pathname

input

include hidden files

bool

True

input

follow symlinks

bool

True

input

icons

bool

True

input

tree layout

bool

True

input

directory color

tlp.Color

(255, 255, 127, 255)

input

other color

tlp.Color

(85, 170, 255, 255)

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('File System Directory')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('File System Directory', graph)

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

# import in a newly created graph
graph = tlp.importGraph('File System Directory', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('File System Directory', params, graph)

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

Fu and Liao Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

m

int

5

input

delta

float

0.5

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Fu and Liao Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Fu and Liao Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Fu and Liao Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Fu and Liao Model', params, graph)

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

GEXF

Description

Supported extensions: gexf

Imports a new graph from a file in the GEXF input format
as it is described in the XML Schema 1.2 specification
(https://gexf.net/schema.html).

Warning: dynamic mode is not supported.

Parameters

name

type

default

direction

description

filename

file pathname

input

curved edges

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('GEXF')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('GEXF', graph)

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

# import in a newly created graph
graph = tlp.importGraph('GEXF', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('GEXF', params, graph)

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

GML

Description

File extension: gml

Imports a new graph from a file (.gml) in GML format (used by Graphlet).
See:
https://github.com/GunterMueller/UNI_PASSAU_FMI_Graph_Drawing
(formerly www.infosun.fim.uni-passau.de/Graphlet/GML/) for details.

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('GML')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('GML', graph)

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

# import in a newly created graph
graph = tlp.importGraph('GML', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('GML', params, graph)

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

GraphML

Description

File extension: graphml

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

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('GraphML')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('GraphML', graph)

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

# import in a newly created graph
graph = tlp.importGraph('GraphML', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('GraphML', params, graph)

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

Grid

Description

Imports a new grid structured graph.

Parameters

name

type

default

direction

description

width

int

10

input

height

int

10

input

connectivity

tlp.StringCollection

4

Values:
4
6
8

input

opposite nodes connected

bool

False

input

spacing

float

1.0

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Grid')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Grid', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Grid', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Grid', params, graph)

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

Grid Approximation

Description

Imports a new grid approximation graph.

Parameters

name

type

default

direction

description

nodes

int

200

input

degree

int

10

input

long edge

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Grid Approximation')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Grid Approximation', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Grid Approximation', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Grid Approximation', params, graph)

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

Guillaume Latapy Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

200

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Guillaume Latapy Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Guillaume Latapy Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Guillaume Latapy Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Guillaume Latapy Model', params, graph)

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

Holme and Kim Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

m

int

5

input

p

float

0.5

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Holme and Kim Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Holme and Kim Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Holme and Kim Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Holme and Kim Model', params, graph)

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

JSON Import

Description

Supported extensions: json

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

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('JSON Import')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('JSON Import', graph)

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

# import in a newly created graph
graph = tlp.importGraph('JSON Import', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('JSON Import', params, graph)

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

Klemm Eguiluz Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

200

input

m

int

10

input

mu

float

0.5

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Klemm Eguiluz Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Klemm Eguiluz Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Klemm Eguiluz Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Klemm Eguiluz Model', params, graph)

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

Liu et al. model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Liu et al. model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Liu et al. model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Liu et al. model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Liu et al. model', params, graph)

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

Npm package dependencies graph

Description

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

Parameters

name

type

default

direction

description

npm package dir

directory pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Npm package dependencies graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Npm package dependencies graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Npm package dependencies graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Npm package dependencies graph', params, graph)

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

Pajek

Description

File extensions: net, paj

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

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

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Pajek')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Pajek', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Pajek', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Pajek', params, graph)

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

Planar Graph

Description

Imports a new randomly generated planar graph.

Parameters

name

type

default

direction

description

nodes

int

30

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Planar Graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Planar Graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Planar Graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Planar Graph', params, graph)

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

Random General Graph

Description

Imports a new randomly generated graph.

Parameters

name

type

default

direction

description

nodes

int

500

input

edges

int

1000

input

directed

bool

False

input

multiple edges

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Random General Graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Random General Graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Random General Graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Random General Graph', params, graph)

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

Random General Tree

Description

Imports a new randomly generated tree.

Parameters

name

type

default

direction

description

min size

int

10

input

max size

int

100

input

max degree

int

5

input

tree layout

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Random General Tree')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Random General Tree', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Random General Tree', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Random General Tree', params, graph)

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

Random Simple Graph

Description

Imports a new randomly generated simple graph.

Parameters

name

type

default

direction

description

nodes

int

500

input

edges

int

1000

input

directed

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Random Simple Graph')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Random Simple Graph', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Random Simple Graph', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Random Simple Graph', params, graph)

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

TGF

Description

File extension: tgf

Imports a new graph from a text file in Trivial Graph Format
as it is described in https://en.wikipedia.org/wiki/Trivial_Graph_Format

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('TGF')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('TGF', graph)

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

# import in a newly created graph
graph = tlp.importGraph('TGF', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('TGF', params, graph)

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

TLP Import

Description

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

Imports a graph recorded in a file using the TLP format (Tulip Software Graph Format).
See 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

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('TLP Import')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('TLP Import', graph)

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

# import in a newly created graph
graph = tlp.importGraph('TLP Import', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('TLP Import', params, graph)

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

TLPB Import

Description

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

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

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('TLPB Import')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('TLPB Import', graph)

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

# import in a newly created graph
graph = tlp.importGraph('TLPB Import', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('TLPB Import', params, graph)

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

UCINET

Description

File extension: txt

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

Parameters

name

type

default

direction

description

filename

file pathname

input

default metric

str

weight

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('UCINET')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('UCINET', graph)

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

# import in a newly created graph
graph = tlp.importGraph('UCINET', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('UCINET', params, graph)

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

Uniform Random Binary Tree

Description

Imports a new randomly generated uniform binary tree.

Parameters

name

type

default

direction

description

min size

int

50

input

max size

int

60

input

tree layout

bool

False

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Uniform Random Binary Tree')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Uniform Random Binary Tree', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Uniform Random Binary Tree', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Uniform Random Binary Tree', params, graph)

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

Wang and Rong Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

m0

int

5

input

m

int

5

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Wang and Rong Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Wang and Rong Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Wang and Rong Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Wang and Rong Model', params, graph)

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

Wang et al. Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

300

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Wang et al. Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Wang et al. Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Wang et al. Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Wang et al. Model', params, graph)

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

Watts Strogatz Model

Description

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

Parameters

name

type

default

direction

description

nodes

int

200

input

k

int

6

input

p

float

0.02

input

original model

bool

True

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Watts Strogatz Model')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Watts Strogatz Model', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Watts Strogatz Model', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Watts Strogatz Model', params, graph)

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

Web Site

Description

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

Parameters

name

type

default

direction

description

server

str

www.labri.fr

input

web page

str

input

max size

int

1000

input

non http links

bool

False

input

other server

bool

False

input

compute layout

bool

True

input

page color

tlp.Color

(240, 0, 120, 128)

input

link color

tlp.Color

(96,96,191,128)

input

redirection color

tlp.Color

(191,175,96,128)

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('Web Site')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('Web Site', graph)

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

# import in a newly created graph
graph = tlp.importGraph('Web Site', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('Web Site', params, graph)

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

graphviz

Description

File extension: dot

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

(see https://www.graphviz.org/doc/info/lang.html)

Parameters

name

type

default

direction

description

filename

file pathname

input

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# for a not yet created graph
params = tlp.getDefaultPluginParameters('graphviz')
# Warning: when importing in an existing graph, use
# params = tlp.getDefaultPluginParameters('graphviz', graph)

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

# import in a newly created graph
graph = tlp.importGraph('graphviz', params)
# Warning: when importing in an existing graph, use
# tlp.importGraph('graphviz', params, graph)

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

Labeling

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

To labels

Description

Use a string representation of the values of a given property as the labels of nodes and/or edges.

Parameters

name

type

default

direction

description

property

tlp.PropertyInterface

viewMetric

input

selection

tlp.BooleanProperty

input

nodes

bool

True

input

edges

bool

True

input

Calling the plugin from Python

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

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

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

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

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

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

Layout

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

3-Connected (Tutte)

Description

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

Calling the plugin from Python

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

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

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

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

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

Align nodes

Description

Align a set of selected nodes on X or Y coordinates with an optional equal distance between the nodes

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

alignment

tlp.StringCollection

X min

input

distance

float

-1

input

Calling the plugin from Python

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

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

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

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

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

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

Balloon (OGDF)

Description

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

Parameters

name

type

default

direction

description

even angles

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

Bertault (OGDF)

Description

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

Parameters

name

type

default

direction

description

impred

bool

False

input

number of iterations

int

20

input

edge length

float

0.0

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['impred'] = ...
# params['number of iterations'] = ...
# params['edge length'] = ...

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

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

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

Bubble Pack

Description

Stable

Parameters

name

type

default

direction

description

complexity

bool

True

input

node size

tlp.SizeProperty

viewSize

input

Calling the plugin from Python

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

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

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

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

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

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

Bubble Tree

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

complexity

bool

True

input

Calling the plugin from Python

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

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

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

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

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

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

Circular

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

search cycle

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

Circular (OGDF)

Description

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

Parameters

name

type

default

direction

description

nodes spacing

float

20

input

levels spacing

float

20

input

circles spacing

float

10

input

connected components spacing

float

20

input

page ratio

float

1

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['nodes spacing'] = ...
# params['levels spacing'] = ...
# params['circles spacing'] = ...
# params['connected components spacing'] = ...
# 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('Circular (OGDF)', resultLayout, params)

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

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

Cone Tree

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

space between levels

float

1.0

input

Calling the plugin from Python

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

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

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

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

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

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

Connected Component Packing (Polyomino)

Description

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

Parameters

name

type

default

direction

description

initial layout

tlp.LayoutProperty

viewLayout

input

node size

tlp.SizeProperty

viewSize

input

rotation

tlp.DoubleProperty

viewRotation

input

margin

int

1

input

increment

int

1

input

Calling the plugin from Python

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

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

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

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

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

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

Connected Components 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

initial layout

tlp.LayoutProperty

viewLayout

input

node size

tlp.SizeProperty

viewSize

input

rotation

tlp.DoubleProperty

viewRotation

input

complexity

tlp.StringCollection

auto

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

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['initial layout'] = ...
# 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 Components Packing', resultLayout, params)

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

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

Davidson Harel (OGDF)

Description

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

Parameters

name

type

default

direction

description

settings

tlp.StringCollection

standard

Values:
standard
repulse
planar

input

speed

tlp.StringCollection

fast

Values:
fast
medium
hq

input

edge length

float

0.0

input

edge length multiplier

float

2.0

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['settings'] = ...
# params['speed'] = ...
# params['edge length'] = ...
# params['edge length multiplier'] = ...

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

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

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

Dendrogram

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

orientation

tlp.StringCollection

top to bottom

Values:
top to bottom
bottom to top
right to left
left to right

input

layer spacing

float

input

node spacing

float

input

Calling the plugin from Python

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

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

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

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

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

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

Dominance (OGDF)

Description

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

Parameters

name

type

default

direction

description

min grid distance

int

1

input

transpose

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

FM^3 (OGDF)

Description

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

Parameters

name

type

default

direction

description

edge length property

tlp.NumericProperty

input

node size

tlp.SizeProperty

viewSize

input

unit edge length

float

10.0

input

new initial layout

bool

True

input

fixed iterations

int

0

input

threshold

float

0.01

input

page format

tlp.StringCollection

square

Values:
square (square format)

input

quality vs speed

tlp.StringCollection

beautiful and fast

Values:
beautiful and fast (medium quality and speed)

input

edge length measurement

tlp.StringCollection

bounding circle

Values:
bounding circle (measure from border of circle surrounding edge end points)

input

allowed positions

tlp.StringCollection

integer

Values:
integer
exponent
all

input

tip over

tlp.StringCollection

no growing row

Values:
no growing row
always
none

input

presort

tlp.StringCollection

decreasing height

Values:
decreasing height (presort by decreasing height of components)

input

galaxy choice

tlp.StringCollection

non uniform lower mass

Values:
non uniform lower mass (use non-uniform probability depending on the lower star masses)

input

max iterations change

tlp.StringCollection

linearly decreasing

Values:
linearly decreasing
rapidly decreasing
constant

input

initial layout

tlp.StringCollection

advanced

Values:
advanced
simple

input

force model

tlp.StringCollection

new

Values:
new (new force-model)

input

repulsive force method

tlp.StringCollection

nmm

Values:
nmm (calculation as for new multipole method)

input

initial layout forces

tlp.StringCollection

default

Values:
default (use default of “new initial layout” parameter)random seed (random layout, based on random seed)

input

reduced tree construction

tlp.StringCollection

subtree by subtree

Values:
subtree by subtree
path by path

input

smallest cell finding

tlp.StringCollection

iteratively

Values:
iteratively (iteratively, in constant time)

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['edge length property'] = ...
# params['node size'] = ...
# params['unit edge length'] = ...
# params['new initial layout'] = ...
# params['fixed iterations'] = ...
# params['threshold'] = ...
# params['page format'] = ...
# params['quality vs speed'] = ...
# params['edge length measurement'] = ...
# params['allowed positions'] = ...
# params['tip over'] = ...
# params['presort'] = ...
# params['galaxy choice'] = ...
# params['max iterations change'] = ...
# params['initial layout'] = ...
# params['force model'] = ...
# params['repulsive force method'] = ...
# params['initial layout forces'] = ...
# params['reduced tree construction'] = ...
# params['smallest cell finding'] = ...

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

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

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

FORBID

Description

Implements the FORBID algorithm, an overlap removal algorithm first published as:
FORBID: Fast Overlap Removal By stochastic gradIent Descent for Graph Drawing ,
Giovannangeli, L., Lalanne, F., Giot, R., & Bourqui, R. (2022, September). In International Symposium on Graph Drawing and Network Visualization (pp. 61-76). Cham: Springer International Publishing.
doi: 10.1007/978-3-031-22203-0_6

Parameters

name

type

default

direction

description

initial layout

tlp.LayoutProperty

viewLayout

input

bounding box

tlp.SizeProperty

viewSize

input

alpha

float

2

input

k

float

4

input

minimal movement

float

0.000001

input

max iterations

int

30

input

max passes

int

100

input

scale step

float

0.1

input

prime

bool

True

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['initial layout'] = ...
# params['bounding box'] = ...
# params['alpha'] = ...
# params['k'] = ...
# params['minimal movement'] = ...
# params['max iterations'] = ...
# params['max passes'] = ...
# params['scale step'] = ...
# params['prime'] = ...

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

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

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

Fast Multipole Embedder (OGDF)

Description

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

Parameters

name

type

default

direction

description

number of iterations

int

100

input

number of coefficients

int

5

input

randomize layout

bool

True

input

default node size

float

20.0

input

default edge length

float

1.0

input

number of threads

int

2

input

Calling the plugin from Python

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

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

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

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

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

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

Fast Multipole Multilevel Embedder (OGDF)

Description

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

Parameters

name

type

default

direction

description

number of threads

int

2

input

multilevel nodes bound

int

10

input

Calling the plugin from Python

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

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

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

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

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

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

Fast Overlap Removal

Description

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

Parameters

name

type

default

direction

description

overlap removal type

tlp.StringCollection

X-Y

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

input

initial layout

tlp.LayoutProperty

viewLayout

input

bounding box

tlp.SizeProperty

viewSize

input

rotation

tlp.DoubleProperty

viewRotation

input

number of passes

int

5

input

x border

float

0.0

input

y border

float

0.0

input

Calling the plugin from Python

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

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

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

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

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

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

Fruchterman Reingold (OGDF)

Description

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

Parameters

name

type

default

direction

description

iterations

int

1000

input

noise

bool

True

input

use node weights

bool

False

input

node weights

tlp.NumericProperty

viewMetric

input

cooling function

tlp.StringCollection

factor

Values:
factor
logarithmic

input

ideal edge length

float

10.0

input

connected components spacing

float

20.0

input

page ratio

float

1.0

input

check convergence

bool

True

input

convergence tolerance

float

0.01

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['iterations'] = ...
# params['noise'] = ...
# params['use node weights'] = ...
# params['node weights'] = ...
# params['cooling function'] = ...
# params['ideal edge length'] = ...
# params['connected components spacing'] = ...
# params['page ratio'] = ...
# params['check convergence'] = ...
# params['convergence tolerance'] = ...

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

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

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

GEM (Frick)

Description

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

Parameters

name

type

default

direction

description

3D layout

bool

False

input

edge length

tlp.NumericProperty

input

initial layout

tlp.LayoutProperty

input

unmovable nodes

tlp.BooleanProperty

input

max iterations

int

0

input

Calling the plugin from Python

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

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

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

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

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

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

GEM Frick (OGDF)

Description

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

Parameters

name

type

default

direction

description

number of rounds

int

30000

input

min temperature

float

0.005

input

initial temperature

float

12.0

input

gravitation

float

0.0625

input

desired length

float

5.0

input

max disturbance

float

0.0

input

rotation angle

float

1.04719755

input

oscillation angle

float

1.57079633

input

rotation sensitivity

float

0.01

input

oscillation sensitivity

float

0.3

input

attraction formula

tlp.StringCollection

Fruchterman/Reingold

Values:
Fruchterman/Reingold
GEM

input

connected components spacing

float

20

input

page ratio

float

1.0

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['number of rounds'] = ...
# params['min temperature'] = ...
# params['initial temperature'] = ...
# params['gravitation'] = ...
# params['desired length'] = ...
# params['max disturbance'] = ...
# params['rotation angle'] = ...
# params['oscillation angle'] = ...
# params['rotation sensitivity'] = ...
# params['oscillation sensitivity'] = ...
# params['attraction formula'] = ...
# params['connected components spacing'] = ...
# 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('GEM Frick (OGDF)', resultLayout, params)

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

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

GRIP

Description

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

Parameters

name

type

default

direction

description

3D layout

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

H3

Description

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

Parameters

name

type

default

direction

description

layout scaling

float

1000

input

Calling the plugin from Python

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

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

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

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

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

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

Hierarchical Graph

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

orientation

tlp.StringCollection

horizontal

Values:
horizontal
vertical

input

layer spacing

float

input

node spacing

float

input

Calling the plugin from Python

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

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

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

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

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

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

Hierarchical Tree (R-T Extended)

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

edge length

tlp.IntegerProperty

input

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

orthogonal

bool

True

input

layer spacing

float

input

node spacing

float

input

bounding circles

bool

False

input

compact layout

bool

True

input

Calling the plugin from Python

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

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

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

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

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

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

Improved Walker

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

orientation

tlp.StringCollection

top to bottom

Values:
top to bottom
bottom to top
right to left
left to right

input

orthogonal

bool

False

input

layer spacing

float

input

node spacing

float

input

Calling the plugin from Python

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

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

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

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

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

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

Improved Walker (OGDF)

Description

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

Parameters

name

type

default

direction

description

siblings distance

float

20

input

subtrees distance

float

20

input

levels distance

float

50

input

trees distance

float

50

input

orthogonal layout

bool

False

input

orientation

tlp.StringCollection

top to bottom

Values:
top to Bottom (edges are oriented from top to bottom)

input

root selection

tlp.StringCollection

source

Values:
source (select a source in the graph)

input

Calling the plugin from Python

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

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

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

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

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

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

Kamada Kawai (OGDF)

Description

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

Parameters

name

type

default

direction

description

stop tolerance

float

0.001

input

used layout

bool

True

input

zero length

float

0

input

edge length

float

0

input

compute max iterations

bool

True

input

global iterations

int

50

input

local iterations

int

50

input

Calling the plugin from Python

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

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

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

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

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

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

LinLog

Description

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

Parameters

name

type

default

direction

description

3D layout

bool

False

input

octtree

bool

True

input

edge weight

tlp.NumericProperty

input

max iterations

int

100

input

repulsion exponent

float

0.0

input

attraction exponent

float

1.0

input

gravitation factor

float

0.05

input

unmovable nodes

tlp.BooleanProperty

input

initial layout

tlp.LayoutProperty

input

Calling the plugin from Python

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

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

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

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

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

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

Mixed Model

Description

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

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input / output

orientation

tlp.StringCollection

vertical

Values:
vertical
horizontal

input

y node-node spacing

float

2

input

x node-node and edge-node spacing

float

2

input

shape property

tlp.IntegerProperty

viewShape

output

Calling the plugin from Python

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

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

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

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

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

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

Multiple Edges Separation

Description

This plugin separates multiple edges existing between each pair of nodes. Since, by default, multiple edges are drawn one on top of the other, this plugin separates their drawing by adding bends.

Parameters

name

type

default

direction

description

gap

float

0.5

input

edge size

tlp.SizeProperty

viewSize

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['gap'] = ...
# params['edge size'] = ...

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

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

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

Node Respecter (OGDF)

Description

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

Parameters

name

type

default

direction

description

random initial placement

bool

True

input

post processing

tlp.StringCollection

none

Values:
none (Keep all bends. )

input

bends normalization angle

float

3.141593

input

number of iterations

int

30000

input

min temperature

float

1.0

input

initial temperature

float

10.0

input

temperature decrease

float

0.0

input

gravitation

float

0.0625

input

oscillation angle

float

1.570796

input

min edge length

float

20.000000

input

init dummies per edge

int

1

input

max dummies per edge

int

3

input

dummy insertion threshold

float

5

input

max disturbance

float

0

input

repulsion distance

float

40.000000

input

connected components spacing

float

30.000000

input

page ratio

float

1.0

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['random initial placement'] = ...
# params['post processing'] = ...
# params['bends normalization angle'] = ...
# params['number of iterations'] = ...
# params['min temperature'] = ...
# params['initial temperature'] = ...
# params['temperature decrease'] = ...
# params['gravitation'] = ...
# params['oscillation angle'] = ...
# params['min edge length'] = ...
# params['init dummies per edge'] = ...
# params['max dummies per edge'] = ...
# params['dummy insertion threshold'] = ...
# params['max disturbance'] = ...
# params['repulsion distance'] = ...
# params['connected components spacing'] = ...
# params['page ratio'] = ...

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

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

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

OrthoTree

Description

Orthogonal Tree layout

Parameters

name

type

default

direction

description

layer spacing

int

10

input

node spacing

int

4

input

Calling the plugin from Python

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

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

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

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

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

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

Perfect aspect ratio

Description

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

Parameters

name

type

default

direction

description

initial layout

tlp.LayoutProperty

viewLayout

input

subgraph only

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

Pivot MDS (OGDF)

Description

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

Parameters

name

type

default

direction

description

number of pivots

int

250

input

use edge costs

bool

False

input

edge costs

float

100

input

3D layout

bool

False

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['number of pivots'] = ...
# params['use edge costs'] = ...
# params['edge costs'] = ...
# 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('Pivot MDS (OGDF)', resultLayout, params)

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

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

Planarization Grid (OGDF)

Description

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

Parameters

name

type

default

direction

description

page ratio

float

1.1

input

number of crossings

int

output

Calling the plugin from Python

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

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

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

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

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

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

Planarization Layout (OGDF)

Description

The planarization approach for drawing graphs.

Parameters

name

type

default

direction

description

page ratio

float

1.1

input

min clique size

int

3

input

embedder

tlp.StringCollection

simple

Values:
simple (embedding from the algorithm of Boyer and Myrvold)

input

number of crossings

int

output

Calling the plugin from Python

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

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

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

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

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

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

Radial Tree (OGDF)

Description

The radial tree layout algorithm.

Parameters

name

type

default

direction

description

levels distance

float

50

input

root selection

tlp.StringCollection

source

Values:
source (Select a source in the graph)

input

Calling the plugin from Python

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

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

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

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

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

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

Random layout

Description

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

Parameters

name

type

default

direction

description

3D layout

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

Squarified Tree Map

Description

Implements a TreeMap and Squarified Treemap layout.
For Treemap see:
Tree visualization with treemaps: a 2-d space-filling approach , Shneiderman B., ACM Transactions on Graphics, vol. 11, 1 pages 92-99 (1992).
For Squarified Treemaps see:
Bruls, M., Huizing, K., & van Wijk, J. J. Proc. of Joint Eurographics and IEEE TCVG Symp. on Visualization (TCVG 2000) IEEE Press, pp. 33-42.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

aspect ratio

float

input

treemap type

bool

False

input

node dize

tlp.SizeProperty

viewSize

output

node shape

tlp.IntegerProperty

viewShape

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['metric'] = ...
# params['aspect ratio'] = ...
# params['treemap type'] = ...
# params['node dize'] = ...
# params['node shape'] = ...

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

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

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

Stress Minimization (OGDF)

Description

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

Parameters

name

type

default

direction

description

termination criterion

tlp.StringCollection

none

Values:
none
position difference
stress

input

fix x coordinates

bool

False

input

fix y coordinates

bool

False

input

fix z coordinates

bool

False

input

has initial layout

bool

False

input

layout components separately

bool

False

input

number of iterations

int

200

input

edge costs

float

100

input

use edge costs property

bool

False

input

edge costs property

tlp.NumericProperty

viewMetric

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['termination criterion'] = ...
# params['fix x coordinates'] = ...
# params['fix y coordinates'] = ...
# params['fix z coordinates'] = ...
# params['has initial layout'] = ...
# params['layout components separately'] = ...
# params['number of iterations'] = ...
# params['edge costs'] = ...
# params['use edge costs property'] = ...
# params['edge costs property'] = ...

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

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

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

Sugiyama (OGDF)

Description

Implements the classical layout algorithm by Sugiyama, Tagawa, and Toda. It is a layer-based approach for producing upward drawings.

Parameters

name

type

default

direction

description

fails

int

4

input

runs

int

15

input

node distance

float

3

input

layer distance

float

3

input

fixed layer distance

bool

False

input

transpose

bool

True

input

connected components packing

bool

True

input

connected components spacing

float

20

input

page ratio

float

1.0

input

align base classes

bool

False

input

align siblings

bool

False

input

ranking

tlp.StringCollection

longest path

Values:
coffman graham (The coffman graham ranking algorithm)

input

two-layer crossing minimization

tlp.StringCollection

barycenter

Values:
barycenter (the barycenter heuristic for 2-layer crossing minimization)

input

hierarchy layout

tlp.StringCollection

fast

Values:
fast (Coordinate assignment phase for the Sugiyama algorithm by Buchheim et al.)

input

transpose vertically

bool

True

input

number of crossings

int

output

number of levels/layers

int

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['fails'] = ...
# params['runs'] = ...
# params['node distance'] = ...
# params['layer distance'] = ...
# params['fixed layer distance'] = ...
# params['transpose'] = ...
# params['connected components packing'] = ...
# params['connected components spacing'] = ...
# params['page ratio'] = ...
# params['align base classes'] = ...
# params['align siblings'] = ...
# params['ranking'] = ...
# params['two-layer crossing minimization'] = ...
# params['hierarchy layout'] = ...
# params['transpose vertically'] = ...
# params['number of crossings'] = ...
# params['number of levels/layers'] = ...

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

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

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

Tile To Rows Packing (OGDF)

Description

The tile-to-rows algorithm for packing drawings of connected components.

Calling the plugin from Python

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

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

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

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

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

Tree Leaf

Description

Implements a simple level-based tree layout.
All leaves are placed at a distance one (x-coordinate) and the order is the one of a suffix ordering. The y-coordinate is the depth in the tree. The other nodes are placed at the center of their children (x-coordinate), and the y-coordinate is their depth in the tree.

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

orientation

tlp.StringCollection

top to bottom

Values:
top to bottom
bottom to top
right to left
left to right

input

uniform layer spacing

bool

True

input

layer spacing

float

input

node spacing

float

input

Calling the plugin from Python

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

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

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

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

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

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

Tree Radial

Description

Implements the radial tree layout algorithm first published as:
MoireGraphs: Radial Focus+Context Visualization and Interaction for Graphs with Visual Nodes ,
T. J. Jankun-Kelly, Kwan-Liu Ma. Proc. IEEE Symposium on Information Visualization, INFOVIS pages 59–66 (2003),
doi: 10.1109/INFVIS.2003.1249009

Parameters

name

type

default

direction

description

node size

tlp.SizeProperty

viewSize

input

layer spacing

float

input

node spacing

float

input

Calling the plugin from Python

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

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

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

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

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

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

Upward Planarization (OGDF)

Description

Implements an alternative to the classical Sugiyama approach. It adapts the planarization approach for hierarchical graphs and produces significantly less crossings than Sugiyama layout.

Parameters

name

type

default

direction

description

transpose

bool

False

input

number of crossings

int

output

number of layers

int

output

Calling the plugin from Python

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

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

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

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

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

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

Visibility (OGDF)

Description

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

Parameters

name

type

default

direction

description

min grid distance

int

1

input

transpose

bool

False

input

Calling the plugin from Python

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

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

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

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

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

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

Measure

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

Betweenness Centrality

Description

Computes the betweeness centrality as described for:

  • nodes in A Faster Algorithm for Betweenness Centrality ,
    U. Brandes, Journal of Mathematical Sociology volume 25, pages 163-177 (2001),
    doi: 10.1080/0022250X.2001.9990249
  • edges in Finding and evaluating community structure in networks ,
    M. E. J. Newman and M. Girvan, Physics Reviews E, volume 69 (2004),
    doi: 10.1103/PhysRevE.69.026113.
The average path length is also computed.

Parameters

name

type

default

direction

description

directed

bool

False

input

norm

bool

False

input

weight

tlp.NumericProperty

input

average path length

float

output

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['directed'] = ...
# params['norm'] = ...
# params['weight'] = ...
# params['average path length'] = ...
# params['target'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Betweenness Centrality', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Betweenness Centrality', params)

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

Biconnected Components

Description

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

Parameters

name

type

default

direction

description

#biconnected components

int

output

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Biconnected Components', 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 Components', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Biconnected Components', params)

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

Cluster

Description

This plugin computes the local clustering coefficient and its average value for the whole graph as described in: Watts, D., Strogatz, S. Collective dynamics of ‘small-world’ networks. Nature 393, 440–442 (1998).
https://doi.org/10.1038/30918
(note: these algorithms work on general simple graphs).

Parameters

name

type

default

direction

description

average clustering coefficient

float

output

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Cluster', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Cluster', params)

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

Connected Components

Description

Implements a decomposition in connected components. This algorithm assigns to each node a value defined as following: if two nodes are in the same connected component they have the same value else they have a different value. Edges get the value of their source node.

Parameters

name

type

default

direction

description

#connected components

int

output

Calling the plugin from Python

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

# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Components', 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 Components', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Connected Components', params)

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

Convolution

Description

Discretization and filtering of the distribution of a node metric using a convolution following:
Strahler based graph clustering using convolution ,
D. Auber, M. Delest and Y. Chiricota, Proceedings of the Eighth International Conference on Information Visualisation, 2004. IV 2004,
doi: 10.1109/IV.2004.1320123

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Convolution', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Convolution', params)

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

Dag Level

Description

Implements a DAG layer decomposition.

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Dag Level', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Dag Level', params)

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

Degree

Description

Assigns its degree to each node.

Parameters

name

type

default

direction

description

type

tlp.StringCollection

InOut

Values:
InOut
In
Out

input

metric

tlp.NumericProperty

input

norm

bool

False

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Degree', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Degree', params)

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

Depth

Description

For each node n on an acyclic graph,it computes the maximum path length between n and the other nodes.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['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('Depth', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Depth', params)

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

Eccentricity

Description

Computes the eccentricity/closeness centrality of each node.
Eccentricity is the maximum distance to go from a node to all others. In this version the Eccentricity value can be normalized (1 means that a node is one of the most eccentric in the network, 0 means that a node is on the centers of the network).
Closeness Centrality is the mean of shortest-paths lengths from a node to others. The normalized values are computed using the reciprocal of the sum of these distances.

Parameters

name

type

default

direction

description

closeness centrality

bool

False

input

norm

bool

True

input

directed

bool

False

input

weight

tlp.NumericProperty

input

graph diameter

float

-1

input / output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['closeness centrality'] = ...
# params['norm'] = ...
# params['directed'] = ...
# params['weight'] = ...
# params['graph diameter'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Eccentricity', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Eccentricity', params)

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

Id

Description

Assigns their Tulip id to nodes and edges.

Parameters

name

type

default

direction

description

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Id', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Id', params)

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

K-Cores

Description

Node partitioning measure based on the K-core decomposition of a graph.
K-cores were first introduced in:
Network structure and minimum degree ,
S. B. Seidman, Social Networks 5:269-287 (1983),
doi: 10.1016/0378-8733(83)90028-X.
This is a method for simplifying a graph topology which helps in analysis and visualization of social networks.
Note : use the default parameters to compute simple K-Cores (undirected and unweighted).

Parameters

name

type

default

direction

description

type

tlp.StringCollection

InOut

Values:
InOut
In
Out

input

metric

tlp.NumericProperty

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('K-Cores', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('K-Cores', params)

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

Leaf

Description

Computes the number of leaves in the subtree induced by each node.
The graph must be acyclic .

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Leaf', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Leaf', params)

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

Leiden

Description

Nodes partitioning measure used for community detection.This is an implementation of the Leiden clustering algorithm first published in:
From Louvain to Leiden: guaranteeing well-connected communities.
Traag, V.A., Waltman. L., Van Eck, N.-J. (2018). Scientific reports, 9(1), 5233.
doi: 10.1038/s41598-019-41695-z.

Parameters

name

type

default

direction

description

directed

bool

True

input

metric

tlp.NumericProperty

input

quality function

tlp.StringCollection

Modularity

Values:
Modularity
Constant Potts
Reichardt and Bornholdt
Erdös-Rényi
Significance
Surprise

input

resolution

float

0.5

input

quality

float

0

output

#communities

int

0

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['directed'] = ...
# params['metric'] = ...
# params['quality function'] = ...
# params['resolution'] = ...
# params['quality'] = ...
# params['#communities'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Leiden', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Leiden', params)

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

Louvain

Description

Nodes partitioning measure used for community detection.This is an implementation of the Louvain clustering algorithm first published in:
Fast unfolding of communities in large networks ,
Blondel, V.D. and Guillaume, J.L. and Lambiotte, R. and Lefebvre, E., Journal of Statistical Mechanics: Theory and Experiment, (2008),
doi: 10.1088/1742-5468/2008/10/P10008.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

precision

float

0.000001

input

modularity

float

output

#communities

int

output

#passes

int

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['metric'] = ...
# params['precision'] = ...
# params['modularity'] = ...
# params['#communities'] = ...
# params['#passes'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Louvain', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Louvain', params)

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

MCL Clustering

Description

Nodes partitioning measure of Markov Cluster algorithm
used for community detection.This is an implementation of the MCL algorithm first published as:
Graph Clustering by Flow Simulation ,
Stijn van Dongen PhD Thesis, University of Utrecht (2000).

Parameters

name

type

default

direction

description

inflate

float

input

metric

tlp.NumericProperty

input

pruning

int

5

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('MCL Clustering', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('MCL Clustering', params)

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

Node

Description

Computes the number of nodes in the subtree induced by each node.
The graph must be acyclic .

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Node', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Node', params)

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

Page Rank

Description

Nodes measure used for links analysis.
First designed by Larry Page and Sergey Brin, it is a link analysis algorithm that assigns a measure to each node of an ‘hyperlinked’ graph. It first appears in:
The anatomy of a large-scale hypertextual Web search engine ,
Sergey Brin and Lawrence Page, Computer Networks and ISDN Systems Journal, vol. 30, number 1, pp 107-117 (1998),
doi: 10.1016/S0169-7552(98)00110-X

Parameters

name

type

default

direction

description

d

float

0.85

input

directed

bool

True

input

weight

tlp.NumericProperty

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Page Rank', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Page Rank', params)

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

Path Length

Description

Assigns to each node the number of paths that goes through it.
The graph must be acyclic .

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Path Length', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Path Length', params)

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

Random metric

Description

Assigns random values to nodes and edges.

Parameters

name

type

default

direction

description

target

tlp.StringCollection

both

Values:
both
nodes
edges

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Random metric', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Random metric', params)

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

Second Order Centrality

Description

An implementation of the Second Order centrality measure first published as:
Second order centrality: Distributed assessment of nodes criticity in complex networks ,
Kermarrec, A.-M., et al. (2011). Computer Communications 34(5): 619-628,
doi: 10.1016/j.comcom.2010.06.007.

This algorithm computes the standard deviation of the return time on each node of a random walker. Central nodes are those with the lower values.

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

debug mode

bool

False

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Second Order Centrality', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Second Order Centrality', params)

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

Strahler

Description

Computes the Strahler numbers.This is an implementation of the Strahler numbers computation, first published as:
Hypsomic analysis of erosional topography ,
A.N. Strahler, Bulletin Geological Society of America 63,pages 1117-1142 (1952).
Extended to graphs in:
Using Strahler numbers for real time visual exploration of huge graphs ,
D. Auber, ICCVG, International Conference on Computer Vision and Graphics, pages 56-69 (2002)

Parameters

name

type

default

direction

description

all nodes

bool

False

input

type

tlp.StringCollection

all

Values:
all
ramification
nested cycles

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strahler', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strahler', params)

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

Strength

Description

Computes the Strength metric as described in
Software component capture using graph clustering ,
Y. Chiricota. F.Jourdan, an G.Melancon, IWPC (2002).
doi: 10.1109/WPC.2003.1199205

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength', params)

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

Strength Clustering

Description

Implements a single-linkage clustering. The similarity measure used here is the Strength Metric computed on edges. The best threshold is found using MQ Quality Measure. See:
Software component capture using graph clustering ,
Y. Chiricota, F.Jourdan, and G. Melancon, IWPC ‘03: Proceedings of the 11th IEEE International Workshop on Program Comprehension
doi: 10.1109/WPC.2003.1199205

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

input

Calling the plugin from Python

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

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength Clustering', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength Clustering', params)

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

Strongly Connected Components

Description

Implements a strongly connected components decomposition.
If two nodes are in the same strongly connected component, they have the same value; if not, they have a different value.
Edges between nodes in the same component have the same value as nodes.
Those between nodes of different components have a null value.
In the undirected case, these later ones are the disconnecting edges (also called bridges) of the graph.

Parameters

name

type

default

direction

description

directed

bool

True

input

#strongly connected components

int

output

Calling the plugin from Python

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

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

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

# 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 Components', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strongly Connected Components', params)

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

Unique Neighbors

Description

Compute the number of unique neighbors of each node; “unique” means that if multiple edges exist between two nodes, they count as one. When the graph is simple, it is equivalent to the degree computation.

Parameters

name

type

default

direction

description

type

tlp.StringCollection

InOut

Values:
InOut
In
Out

input

self loops

bool

False

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['type'] = ...
# params['self loops'] = ...

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Unique Neighbors', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Unique Neighbors', params)

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

Welsh & Powell

Description

Nodes coloring measure,
values assigned to adjacent nodes are always different.

Calling the plugin from Python

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

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

# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Welsh & Powell', resultMetric, params)

# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Welsh & Powell', params)

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

Resizing

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

Auto Sizing

Description

Resize the nodes and edges of a graph so that the graph gets easy to read. The size of a node will depend on the number of its sons.

Calling the plugin from Python

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

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

# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Auto Sizing', resultSize, params)

# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Auto Sizing', params)

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

Size Mapping

Description

Maps the size of the graph elements onto the values of a given numeric property.

Parameters

name

type

default

direction

description

metric

tlp.NumericProperty

viewMetric

input

input

tlp.SizeProperty

viewSize

input

width

bool

True

input

height

bool

True

input

depth

bool

False

input

min size

float

1

input

max size

float

10

input

type

tlp.StringCollection

linear

Values:
linear
uniform

input

target

tlp.StringCollection

nodes

Values:
nodes
edges

input

mapping proportionality

tlp.StringCollection

area/volume

Values:
area/volume
dimensions

input

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['metric'] = ...
# params['input'] = ...
# params['width'] = ...
# params['height'] = ...
# params['depth'] = ...
# params['min size'] = ...
# params['max size'] = ...
# params['type'] = ...
# params['target'] = ...
# params['mapping proportionality'] = ...

# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Size Mapping', resultSize, params)

# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Size Mapping', params)

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

Selection

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

Induced SubGraph

Description

Selects all the nodes/edges of the subgraph induced by a set of selected nodes.

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

use edges

bool

False

input

#edges selected

int

output

Calling the plugin from Python

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

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Induced SubGraph', resultSelection, params)

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

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

Kruskal

Description

Implements the classical Kruskal algorithm to select a minimum spanning tree in a connected graph.Only works on undirected graphs, (ie. the orientation of edges is omitted).

Parameters

name

type

default

direction

description

edge weight

tlp.NumericProperty

viewMetric

input

#edges selected

int

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['edge weight'] = ...
# params['#edges selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Kruskal', resultSelection, params)

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

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

Loop Selection

Description

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

Parameters

name

type

default

direction

description

#edges selected

int

output

Calling the plugin from Python

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Loop Selection', resultSelection, params)

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

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

Make Selection a Graph

Description

Extends the selection to have a graph.
All selected edges of the current graph will have their extremities selected (no dangling edges).

Parameters

name

type

default

direction

description

selection

tlp.BooleanProperty

viewSelection

input

#elements selected

int

output

Calling the plugin from Python

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

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Make Selection a Graph', resultSelection, params)

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

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

Multiple Edges Selection

Description

Selects the multiple or parallel edges of a graph.
Two edges are considered as parallel if they have the same source/origin and the same target/destination.If it exists n edges between two nodes, only n-1 edges will be selected.

Parameters

name

type

default

direction

description

directed

bool

False

input

#edges selected

int

output

Calling the plugin from Python

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

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', resultSelection, params)

# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', params)

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

Reachable SubGraph

Description

Selects all nodes and edges at a given distance of a set of selected nodes.

Parameters

name

type

default

direction

description

edge direction

tlp.StringCollection

output edges

Values:
output edges: follow output edges (directed)

input

selection

tlp.BooleanProperty

viewSelection

input

max distance

int

5

input

#edges selected

int

output

#nodes selected

int

output

Calling the plugin from Python

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

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

# set any input parameter value if needed
# params['edge direction'] = ...
# params['selection'] = ...
# params['max distance'] = ...
# params['#edges selected'] = ...
# params['#nodes selected'] = ...

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Reachable SubGraph', resultSelection, params)

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

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

Spanning Dag

Description

Selects an acyclic subgraph of a graph.

Parameters

name

type

default

direction

description

#edges selected

int

output

Calling the plugin from Python

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Dag', resultSelection, params)

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

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

Spanning Forest

Description

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

Parameters

name

type

default

direction

description

#edges selected

int

output

Calling the plugin from Python

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

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

# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Forest', resultSelection, params)

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

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