Tulip plugins documentation¶
In this section, you can find some documentation regarding the C++ algorithm plugins bundled in the Tulip software but also with the Tulip Python modules installable through the pip tool. In particular, an exhaustive description of the input and output parameters for each plugin is given. To learn how to call all these algorithms in Python, you can refer to the Applying an algorithm on a graph section. The plugins documentation is ordered according to their type.
Warning
If you use the Tulip Python bindings trough the classical Python
interpreter, some plugins (Color Mapping, Convolution Clustering,
File System Directory, GEXF, SVG Export, Website) require the
tulipgui
module to be imported before they can be called
as they use Qt under the hood.
Algorithm¶
To call these plugins, you must use the tlp.Graph.applyAlgorithm()
method. See also Calling a general algorithm on a graph for more details.
Acyclic¶
Description¶
Tests whether a graph is acyclic or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Acyclic', graph)
success = graph.applyAlgorithm('Acyclic', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Biconnected¶
Description¶
Tests whether a graph is biconnected or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Biconnected', graph)
success = graph.applyAlgorithm('Biconnected', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Connected¶
Description¶
Tests whether a graph is connected or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected', graph)
success = graph.applyAlgorithm('Connected', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Curve edges¶
Description¶
Computes quadratic or cubic bezier paths for edges
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layout |
viewLayout |
input |
The input layout of the graph. |
|
curve roundness |
|
0.5 |
input |
Parameter for tweaking the curve roundness. The value range is from 0 to 1 with a maximum roundness at 0.5. |
curve type |
QuadraticContinuous |
input |
The type of curve to compute (12 available: 6 quadratics and 6 cubics). |
|
bezier edges |
|
|
input |
If activated, set all edge shapes to Bezier curves. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Curve edges', graph)
# set any input parameter value if needed
# params['layout'] = ...
# params['curve roundness'] = ...
# params['curve type'] = ...
# params['bezier edges'] = ...
success = graph.applyAlgorithm('Curve edges', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Delaunay triangulation¶
Description¶
Performs a Delaunay triangulation, in considering the positions of the graph nodes as a set of points. The building of simplices (triangles in 2D or tetrahedrons in 3D) consists in adding edges between adjacent nodes.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
simplices |
|
|
input |
If true, a subgraph will be added for each computed simplex (a triangle in 2d, a tetrahedron in 3d). |
original clone |
|
|
input |
If true, a clone subgraph named ‘Original graph’ will be first added. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Delaunay triangulation', graph)
# set any input parameter value if needed
# params['simplices'] = ...
# params['original clone'] = ...
success = graph.applyAlgorithm('Delaunay triangulation', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Directed Tree¶
Description¶
Tests whether a graph is a directed tree or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Directed Tree', graph)
success = graph.applyAlgorithm('Directed Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Edge bundling¶
Description¶
Edges routing algorithm, implementing the intuitive Edge Bundling technique published as:
Winding Roads: Routing edges into bundles
,Antoine Lambert, Romain Bourqui and David Auber, Computer Graphics Forum special issue on 12th Eurographics/IEEE-VGTC Symposium on Visualization, pages 853-862 (2010), doi: <a href=”https://doi.org/10.1111/j.1467-8659.2009.01700.x”>10.1111/j.1467-8659.2009.01700.x</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layout |
viewLayout |
input |
The input layout of the graph. |
|
size |
viewSize |
input |
The input node sizes. |
|
grid_graph |
|
|
input |
If true, a subgraph corresponding to the grid used for routing edges will be added. |
3D_layout |
|
|
input |
If true, a 3D input layout is assumed and 3D edge bundling will be performed. Warning: the generated grid graph will be much bigger and the algorithm execution time will be slower compared to the 2D case. |
sphere_layout |
|
|
input |
If true, a spherical layout of the nodes is assumed. Edges will be then routed along the sphere surface. |
long_edges |
|
0.9 |
input |
indicates how long edges will be routed. A value less than 1.0 will promote paths outside dense regions of the input graph drawing. |
split_ratio |
|
10 |
input |
indicates the granularity of the grid that will be generated for routing edges. The higher its value, the more precise the grid is. |
iterations |
|
2 |
input |
gives the number of iterations of the edge bundling process. The higher its value, the more edges will be bundled. |
max_thread |
|
0 |
input |
gives the number of threads to use for speeding up the edge bundling process. A value of 0 will use as much threads as processors on the host machine. |
edge_node_overlap |
|
|
input |
If true, edges can be routed on original nodes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Edge bundling', graph)
# set any input parameter value if needed
# params['layout'] = ...
# params['size'] = ...
# params['grid_graph'] = ...
# params['3D_layout'] = ...
# params['sphere_layout'] = ...
# params['long_edges'] = ...
# params['split_ratio'] = ...
# params['iterations'] = ...
# params['max_thread'] = ...
# params['edge_node_overlap'] = ...
success = graph.applyAlgorithm('Edge bundling', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Equal Value¶
Description¶
Performs a graph clusterization grouping in the same cluster the nodes or edges having the same value for a given property.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Property |
viewMetric |
input |
Property used to partition the graph. |
|
Type |
nodes |
input |
The type of graph elements to partition. |
|
Connected |
|
|
input |
If true, the resulting subgraphs are guaranteed to be connected. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Equal Value', graph)
# set any input parameter value if needed
# params['Property'] = ...
# params['Type'] = ...
# params['Connected'] = ...
success = graph.applyAlgorithm('Equal Value', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Free Tree¶
Description¶
Tests whether a graph is a free tree or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Free Tree', graph)
success = graph.applyAlgorithm('Free Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Graph¶
Description¶
Tests whether the set of the selected elements of the current graph is a graph or not (no dangling edges).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
|
selection |
viewSelection |
input |
The property indicating the selected elements |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Graph', graph)
# set any input parameter value if needed
# params['result'] = ...
# params['selection'] = ...
success = graph.applyAlgorithm('Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
H3 Layout Helper¶
Description¶
Enables to easily configure a H3 layout visualisation for a connected quasi-hierarchical graph. As this is a 3d layout, some rendering setup has to be done after the algorithm execution in order to get an aesthetic rendering of it in Tulip. That plugin takes care of calling the H3 layout algorithm, setting node shapes as sphere, setting edge extremity shapes to cone and set appropriate rendering parameters for 3d layout visualization.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layout scaling |
|
1000 |
input |
the scale factor to apply to the computed layout |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('H3 Layout Helper', graph)
# set any input parameter value if needed
# params['layout scaling'] = ...
success = graph.applyAlgorithm('H3 Layout Helper', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Hierarchical¶
Description¶
This algorithm divides the graph in 2 different subgraphs; the first one contains the nodes which have their metric value below the mean, and, the other one, in which nodes have their metric value above that mean value. Then, the algorithm is recursively applied to this subgraph (the one with the values above the threshold) until one subgraph contains less than 10 nodes.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
viewMetric |
input |
An existing node metric property. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical', graph)
# set any input parameter value if needed
# params['metric'] = ...
success = graph.applyAlgorithm('Hierarchical', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Acyclic¶
Description¶
Makes a graph acyclic.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Acyclic', graph)
success = graph.applyAlgorithm('Make Acyclic', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Biconnected¶
Description¶
Makes a graph biconnected.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Biconnected', graph)
success = graph.applyAlgorithm('Make Biconnected', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Connected¶
Description¶
Makes a graph connected.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Connected', graph)
success = graph.applyAlgorithm('Make Connected', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Directed Tree¶
Description¶
Makes a free tree a directed tree.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Directed Tree', graph)
success = graph.applyAlgorithm('Make Directed Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Planar Embedding¶
Description¶
Makes the graph a planar embedding if it is planar.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Planar Embedding', graph)
success = graph.applyAlgorithm('Make Planar Embedding', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Simple¶
Description¶
Makes a graph simple.
An undirected graph is simple if it has no loops and no more than one edge between any unordered pair of vertices. A directed graph is simple if has no loops and no more than one edge between any ordered pair of vertices.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
directed |
|
|
input |
Indicates if the graph should be considered as directed or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Simple', graph)
# set any input parameter value if needed
# params['directed'] = ...
success = graph.applyAlgorithm('Make Simple', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Maximal Cliques Enumeration¶
Description¶
Compute all maximal cliques (or maximal cliques whose size is above a given threshold) according to algorithm. published as:
Listing All Maximal Cliques in Sparse Graphs in Near-optimal Time , In: Cheong O., Chwa KY., Park K. (eds) Algorithms and Computation. ISAAC 2010. Lecture Notes in Computer Science, vol 6506. Springer, Berlin, Heidelberg. doi: <a href=”https://doi.org/10.1007/978-3-642-17517-6_36”>10.1007/978-3-642-17517-6_36</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
minimum size |
|
0 |
input |
Clique minimum size |
#cliques created |
|
output |
Number of cliques (subgraphs) created |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Maximal Cliques Enumeration', graph)
# set any input parameter value if needed
# params['minimum size'] = ...
# params['#cliques created'] = ...
success = graph.applyAlgorithm('Maximal Cliques Enumeration', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Outer Planar¶
Description¶
Tests whether a graph is outer planar or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Outer Planar', graph)
success = graph.applyAlgorithm('Outer Planar', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Planar¶
Description¶
Tests whether a graph is planar or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planar', graph)
success = graph.applyAlgorithm('Planar', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Planar Embedding¶
Description¶
Tests whether a graph is a planar embedding or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planar Embedding', graph)
success = graph.applyAlgorithm('Planar Embedding', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Quotient Clustering¶
Description¶
Computes a quotient subgraph (meta-nodes pointing on subgraphs) using an already existing subgraphs hierarchy.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
oriented |
|
|
input |
If true, the graph is considered oriented. |
node function |
none |
input |
Function used to compute a measure for a meta-node based on the values of its underlying nodes. If ‘none’, no value is computed. |
|
edge function |
none |
input |
Function used to compute a measure for a meta-edge based on the values of its underlying edges. If ‘none’, no value is computed. |
|
meta-node label |
input |
Property used to label meta-nodes. An arbitrary underlying node is chosen and its associated value for the given property becomes the meta-node label. |
||
use name of subgraph |
|
|
input |
If true, the meta-node label is the same as the name of the subgraph it represents. |
recursive |
|
|
input |
If true, the algorithm is applied along the entire hierarchy of subgraphs. |
layout quotient graph(s) |
|
|
input |
If true, a force directed layout is computed for each quotient graph. |
layout clusters |
|
|
input |
If true, a force directed layout is computed for each cluster graph. |
edge cardinality |
|
|
input |
If true, the property edgeCardinality is created for each meta-edge of the quotient graph (and store the number of edges it represents). |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Quotient Clustering', graph)
# set any input parameter value if needed
# params['oriented'] = ...
# params['node function'] = ...
# params['edge function'] = ...
# params['meta-node label'] = ...
# params['use name of subgraph'] = ...
# params['recursive'] = ...
# params['layout quotient graph(s)'] = ...
# params['layout clusters'] = ...
# params['edge cardinality'] = ...
success = graph.applyAlgorithm('Quotient Clustering', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Reverse edges¶
Description¶
Reverse selected edges of the graph (or all if no selection property is given).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
selection |
viewSelection |
input |
Only edges selected in this property (or all edges if no property is given) will be reversed. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Reverse edges', graph)
# set any input parameter value if needed
# params['selection'] = ...
success = graph.applyAlgorithm('Reverse edges', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Simple¶
Description¶
Tests whether a graph is simple or not.
An undirected graph is simple if it has no loops and no more than one edge between any unordered pair of vertices. A directed graph is simple if has no loops and no more than one edge between any ordered pair of vertices.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
|
directed |
|
|
input |
Indicates if the graph should be considered as directed or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Simple', graph)
# set any input parameter value if needed
# params['result'] = ...
# params['directed'] = ...
success = graph.applyAlgorithm('Simple', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Squarified Tree Map Helper¶
Description¶
Enables to easily configure a treemap layout visualisation for a tree. As the treemap layout is different from classical node link diagram representation, some visual properties setup has to be done in order to get an aesthetic visualization of it in Tulip. This plugin takes care of calling the ‘Squarified Tree Map’ layout algorithm and adjust some visual properties to get a correct rendering of the treemap.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
input |
An optional metric used to estimate the size allocated to each node |
||
aspect ratio |
|
1 |
input |
The aspect ratio (height/width) for the rectangle corresponding to the root node |
treemap type |
|
|
input |
If true, use original Treemaps (B. Shneiderman) otherwise useSquarified Treemaps (J. J. van Wijk) |
border color |
(255, 255, 255, 255) |
input |
The border color that will be applied to all treemap nodes |
|
layout |
viewLayout |
output |
The output treemap layout |
|
sizes |
viewSize |
output |
The output treemap sizes |
|
shapes |
viewShape |
output |
The output treemap shapes |
|
colors |
viewColor |
output |
The output treemap colors |
|
border colors |
viewBorderColor |
output |
The output treemap border colors |
|
border widths |
viewBorderWidth |
output |
The output treemap border widths |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Squarified Tree Map Helper', graph)
# set any input parameter value if needed
# params['metric'] = ...
# params['aspect ratio'] = ...
# params['treemap type'] = ...
# params['border color'] = ...
# params['layout'] = ...
# params['sizes'] = ...
# params['shapes'] = ...
# params['colors'] = ...
# params['border colors'] = ...
# params['border widths'] = ...
success = graph.applyAlgorithm('Squarified Tree Map Helper', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Triconnected¶
Description¶
Tests whether a graph is triconnected or not.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
result |
|
output |
Whether the test succeeded or not. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Triconnected', graph)
success = graph.applyAlgorithm('Triconnected', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Voronoi diagram¶
Description¶
Performs a Voronoi decomposition, in considering the positions of the graph nodes as a set of points. These points define the seeds (or sites) of the voronoi cells. New nodes and edges are added to build the convex polygons defining the contours of these cells.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
voronoi cells |
|
|
input |
If true, a subgraph will be added for each computed voronoi cell. |
connect |
|
|
input |
If true, existing graph nodes will be connected to the vertices of their voronoi cell. |
original clone |
|
|
input |
If true, a clone subgraph named ‘Original graph’ will be first added. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Voronoi diagram', graph)
# set any input parameter value if needed
# params['voronoi cells'] = ...
# params['connect'] = ...
# params['original clone'] = ...
success = graph.applyAlgorithm('Voronoi diagram', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Coloring¶
To call these plugins, you must use the tlp.Graph.applyColorAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
Alpha Mapping¶
Description¶
Map metric values to alpha component of graph element colors. In other words, it enables to compute the graph elements transparency according to the values stored in a numeric property of a graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
input property |
viewMetric |
input |
The input numeric property from which to compute alpha mapping |
|
target |
nodes |
input |
Whether alpha values are computed for nodes or edges |
|
type |
linear |
input |
That parameter defines the type of alpha mapping to perform.
For the linear case, the minimum value of the input numeric property
is mapped to a minimum alpha value picked by the user, the maximum
value is mapped to a maximum alpha value picked by the user, and a
linear interpolation is used between both to compute the associated
alpha of the graph element color. |
|
min alpha |
|
0 |
input |
The minimum alpha value (between 0 and 255) to map on graph elements colors |
max alpha |
|
255 |
input |
The maximum alpha value (between 0 and 255) to map on graph elements colors |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Alpha Mapping', graph)
# set any input parameter value if needed
# params['input property'] = ...
# params['target'] = ...
# params['type'] = ...
# params['min alpha'] = ...
# params['max alpha'] = ...
# either create or get a color property from the graph to store the result of the algorithm
resultColor = graph.getColorProperty('resultColor')
success = graph.applyColorAlgorithm('Alpha Mapping', resultColor, params)
# or store the result of the algorithm in the default Tulip color property named 'viewColor'
success = graph.applyColorAlgorithm('Alpha Mapping', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Color Mapping¶
Description¶
Colorizes the nodes or edges of a graph according to the values of a given property.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
type |
linear |
input |
If linear, logarithmic or uniform, the input property must be a numeric property.
|
|
input property |
viewMetric |
input |
This property is used to get the values affected to graph items. |
|
target |
nodes |
input |
Whether colors are computed for nodes or for edges. |
|
color scale |
input |
The color scale used to transform a node/edge property value into a color. |
||
override minimum value |
|
|
input |
If true override the minimum value of the input property to keep coloring consistent across datasets. |
minimum value |
|
input |
That value will be used to override the minimum one of the input property. |
|
override maximum value |
|
|
input |
If true override the maximum value of the input property to keep coloring consistent across datasets. |
maximum value |
|
input |
That value will be used to override the maximum one of the input property. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Color Mapping', graph)
# set any input parameter value if needed
# params['type'] = ...
# params['input property'] = ...
# params['target'] = ...
# params['color scale'] = ...
# params['override minimum value'] = ...
# params['minimum value'] = ...
# params['override maximum value'] = ...
# params['maximum value'] = ...
# either create or get a color property from the graph to store the result of the algorithm
resultColor = graph.getColorProperty('resultColor')
success = graph.applyColorAlgorithm('Color Mapping', resultColor, params)
# or store the result of the algorithm in the default Tulip color property named 'viewColor'
success = graph.applyColorAlgorithm('Color Mapping', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Export¶
To call these plugins, you must use the tlp.exportGraph()
function.
CSV Export¶
Description¶
Supported extensions: csv
Exports the values of tulip graph properties associated to graph elements in a CSV file.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Type of elements |
nodes |
input |
This parameter enables to choose the type of graph elements to export |
|
Export selection |
|
|
input |
This parameter indicates if only selected elements have to be exported |
Export selection property |
viewSelection |
input |
This parameters enables to choose the property used for the selection |
|
Export id |
|
|
input |
This parameter indicates if the id of graph elements has to be exported |
Exported properties |
PropertiesCollection |
the user defined properties |
input |
This parameter indicates the properties to be exported. Default indicates only the user defined properties |
Field separator |
input |
This parameter indicates the field separator (sequence of one or more characters used to specify the boundary between two consecutive fields). |
||
Custom separator |
|
; |
input |
This parameter allows to indicate a custom field separator. The ‘Field separator’ parameter must be set to ‘Custom’ |
String delimiter |
“ |
input |
This parameter indicates the text delimiter (sequence of one or more characters used to specify the boundary of value of type text). |
|
Decimal mark |
. |
input |
This parameter indicates the character used to separate the integer part from the fractional part of a number written in decimal form. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('CSV Export', graph)
# set any input parameter value if needed
# params['Type of elements'] = ...
# params['Export selection'] = ...
# params['Export selection property'] = ...
# params['Export id'] = ...
# params['Exported properties'] = ...
# params['Field separator'] = ...
# params['Custom separator'] = ...
# params['String delimiter'] = ...
# params['Decimal mark'] = ...
outputFile = '<path to a file>'
success = tlp.exportGraph('CSV Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GML Export¶
Description¶
Supported extensions: gml
Exports a Tulip graph in a file using the GML format (used by Graphlet).
See: <a href=”http://www.infosun.fim.uni-passau.de/Graphlet/GML/”>http://www.infosun.fim.uni-passau.de/Graphlet/GML/</a> for details.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GML Export', graph)
outputFile = '<path to a file>'
success = tlp.exportGraph('GML Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
JSON Export¶
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Beautify JSON string |
|
|
input |
If true, generate a JSON string with indentation and line breaks. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('JSON Export', graph)
# set any input parameter value if needed
# params['Beautify JSON string'] = ...
outputFile = '<path to a file>'
success = tlp.exportGraph('JSON Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
SVG Export¶
Description¶
Supported extensions: svg, svgz (compressed svg).
Exports a graph visualization in a SVG formatted file.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Edge color interpolation |
|
|
input |
Indicates if edge color interpolation has to be used. |
Edge size interpolation |
|
|
input |
Indicates if edge size interpolation has to be used. |
Edge extremities |
|
|
input |
Indicates if edge extremities have to be exported. |
Background color |
(255,255,255,255) |
input |
Specifies the background color. |
|
No background |
|
|
input |
Specifies if a background is needed. |
Makes SVG output human readable |
|
|
input |
Adds line-breaks and indentation to empty sections between elements (ignorable whitespace). The main purpose of this parameter is to split the data into several lines, and to increase readability for a human reader. Be careful, this adds a large amount of data to the output file. |
Export node labels |
|
|
input |
Specifies if node labels have to be exported. |
Export edge labels |
|
|
input |
Specifies if edge labels have to be exported. |
Export metanode labels |
|
|
input |
Specifies if node and edge labels inside metanodes have to be exported. |
Use Web Open Font Format v2 |
|
|
input |
Uses Web Open Font Format version 2 (woff2) to reduce generated file length. This format is supported in almost all recent Internet browsers. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('SVG Export', graph)
# set any input parameter value if needed
# params['Edge color interpolation'] = ...
# params['Edge size interpolation'] = ...
# params['Edge extremities'] = ...
# params['Background color'] = ...
# params['No background'] = ...
# params['Makes SVG output human readable'] = ...
# params['Export node labels'] = ...
# params['Export edge labels'] = ...
# params['Export metanode labels'] = ...
# params['Use Web Open Font Format v2'] = ...
outputFile = '<path to a file>'
success = tlp.exportGraph('SVG Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
TLP Export¶
Description¶
Supported extensions: tlp, tlpz (compressed), tlp.gz (compressed)
Exports a graph in a file using the TLP format (Tulip Software Graph Format).
See http://tulip.labri.fr->Framework->TLP File Format for more details.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
name |
|
input |
Name of the graph being exported. |
|
author |
|
input |
Authors |
|
text::comments |
|
This file was generated by Tulip. |
input |
Description of the graph. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('TLP Export', graph)
# set any input parameter value if needed
# params['name'] = ...
# params['author'] = ...
# params['text::comments'] = ...
outputFile = '<path to a file>'
success = tlp.exportGraph('TLP Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
TLPB Export¶
Description¶
Supported extensions: tlpb, tlpbz (compressed), tlpb.gz (compressed)
Exports a graph in a file using the Tulip binary format.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('TLPB Export', graph)
outputFile = '<path to a file>'
success = tlp.exportGraph('TLPB Export', graph, outputFile, params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Import¶
To call these plugins, you must use the tlp.importGraph()
function.
Adjacency Matrix¶
Description¶
Imports a graph from a file coding an adjacency matrix.
File format:
The input format of this plugin is an ascii file where each line represents a row of the matrix.In each row, cells must be separated by a space.
Let M(i,j) be a cell of the matrix :
- if i==j we define the value of a node.
- if i!=j we define a directed edge between node[i] and node[j]
If M(i,j) is real value (0, .0, -1, -1.0), it is stored in the viewMetric property of the graph.
If M(i,j) is a string, it is stored in the viewLabel property of the graph.
Use & to set the viewMetric and viewLabel properties of a node or edge in the same time.
If M(i,j) == @ an edge will be created without value
If M(i,j) == # no edge will be created between node[i] and node[j]
EXAMPLE 1 :
A
# B
# # C
Defines a graph with 3 nodes (with labels A B C) and without edge.
EXAMPLE 2 :
A
@ B
@ @ C
Defines a simple complete graph with 3 nodes (with labels A B C) and no label (or value) on its edges
EXAMPLE 3 :
A # E & 5
@ B
# @ C
Defines a graph with 3 nodes and 3 edges, the edge between A and C is named E and has the value 5
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
This parameter defines the pathname of the file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Adjacency Matrix')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('Adjacency Matrix', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Attract And Introduce Model¶
Description¶
Randomly generates a graph using the Attract and Introduce Model described in
J. H. Fowlera, C. T. Dawesa, N. A. Christakisb.
Model of genetic variation in human social networks.
PNAS 106 (6): 1720-1724, 2009.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
750 |
input |
This parameter defines the amount of nodes used to build the graph. |
edges |
|
3150 |
input |
This parameter defines the amount of edges used to build the graph. |
alpha |
|
0.9 |
input |
This parameter defines the alpha parameter between [0,1]. This one is a percentage and describes the distribution of attractiveness; the model suggests about 1 - alpha of the individuals have very low attractiveness whereas the remaining alpha are approximately evenly distributed between low, medium, and high attractiveness |
beta |
|
0.3 |
input |
This parameter defines the beta parameter between [0,1]. This parameter indicates the probability a person will have the desire to introduce someone. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Attract And Introduce Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...
# params['alpha'] = ...
# params['beta'] = ...
graph = tlp.importGraph('Attract And Introduce Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
BibTeX¶
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
This parameter indicates the pathname of the file(.bib) to import. |
|
Nodes to import |
Authors |
input |
The type of nodes to create: Authors (Create nodes for authors only, publications are represented as edges between authors) |
|
One edge per publication |
|
|
input |
When only Authors are imported, this parameter indicates:
|
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('BibTeX')
# set any input parameter value if needed
# params['filename'] = ...
# params['Nodes to import'] = ...
# params['One edge per publication'] = ...
graph = tlp.importGraph('BibTeX', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Bollobas et al. Model¶
Description¶
Randomly generates a scale-free graph using the model described in
B. Bollobas, O.M Riordan, J. Spencer and G. Tusnady.
The Degree Sequence of a Scale-Free Random Graph Process.
RSA: Random Structures & Algorithms, 18, 279 (2001)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
2000 |
input |
This parameter defines the amount of nodes used to build the scale-free graph. |
minimum degree |
|
4 |
input |
Minimum degree. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Bollobas et al. Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['minimum degree'] = ...
graph = tlp.importGraph('Bollobas et al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Bu Wang Zhou Model¶
Description¶
Randomly generates a scale-free graph unsing the model described in
Shouliang Bu, Bing-Hong Wang, Tao Zhou.
Gaining scale-free and high clustering complex networks.
Physica A, 374, 864–868, 2007.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
200 |
input |
Number of nodes. |
types of nodes |
|
3 |
input |
Number of node types. |
m |
|
2 |
input |
Number of edges added for each new node. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Bu Wang Zhou Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['types of nodes'] = ...
# params['m'] = ...
graph = tlp.importGraph('Bu Wang Zhou Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
CMake dependencies graph¶
Description¶
Import the targets dependencies graph of a CMake project
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
CMake project source dir |
directory pathname |
input |
The root source directory of the CMake project |
|
CMake executable |
file pathname |
cmake |
input |
Optional parameter in order to provide the path to the CMake executable. By default CMake executable path is assumed to be in your PATH environment variable |
CMake parameters |
|
input |
Optional parameter for providing some parameters to CMake in order to correctly configure the project |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('CMake dependencies graph')
# set any input parameter value if needed
# params['CMake project source dir'] = ...
# params['CMake executable'] = ...
# params['CMake parameters'] = ...
graph = tlp.importGraph('CMake dependencies graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Catanzaro and al. Model¶
Description¶
Randomly generates a graph using the model described in
Michele Catanzaro, Guido Caldarelli, and Luciano Pietronero.
Assortative model for social networks.
Physical Review E (Statistical, Nonlinear, and Soft Matter Physics), 70(3), (2004).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
m |
|
5 |
input |
Number of nodes added at each time step. |
p |
|
0.5 |
input |
p defines the probality a new node is wired to an existing one |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Catanzaro and al. Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['p'] = ...
graph = tlp.importGraph('Catanzaro and al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Complete General Graph¶
Description¶
Imports a new complete graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
5 |
input |
Number of nodes in the final graph. |
directed |
|
|
input |
If false, the generated graph is undirected. If true, two edges are created between each pair of nodes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Complete General Graph')
# set any input parameter value if needed
# params['nodes'] = ...
# params['directed'] = ...
graph = tlp.importGraph('Complete General Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Complete Tree¶
Description¶
Imports a new complete tree.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
depth |
|
5 |
input |
Depth of the tree. |
degree |
|
2 |
input |
The tree’s degree. |
tree layout |
|
|
input |
If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Complete Tree')
# set any input parameter value if needed
# params['depth'] = ...
# params['degree'] = ...
# params['tree layout'] = ...
graph = tlp.importGraph('Complete Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Empty graph¶
Description¶
A no-op plugin to import empty graphs
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Empty graph')
graph = tlp.importGraph('Empty graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Erdős-Rényi Random Graph¶
Description¶
Import a randomly generated graph following the Erdős-Rényi model. Given a positive integer n and a probability value in [0,1], define the graph G(n,p) to be the undirected graph on n vertices whose edges are chosen as follows: For all pairs of vertices v,w there is an edge (v,w) with probability p.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
50 |
input |
Number of nodes in the final graph. |
probability |
|
0.5 |
input |
Probability of having an edge between each pair of vertices in the graph. |
self loop |
|
|
input |
Generate self loops (an edge with source and target on the same node) with the same probability |
directed |
|
|
input |
Generate a directed graph (arcs u->v and v->u have the same probability) |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Erdős-Rényi Random Graph')
# set any input parameter value if needed
# params['nodes'] = ...
# params['probability'] = ...
# params['self loop'] = ...
# params['directed'] = ...
graph = tlp.importGraph('Erdős-Rényi Random Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
File System Directory¶
Description¶
Imports a tree representation of a file system directory.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
directory |
directory pathname |
input |
The directory to scan recursively. |
|
include hidden files |
|
|
input |
If true, also include hidden files. |
follow symlinks |
|
|
input |
If true, follow symlinks on Unix (including Mac OS X) or .lnk file on Windows. |
icons |
|
|
input |
If true, set icons as node shapes according to file mime types. |
tree layout |
|
|
input |
If true, apply the ‘Bubble Tree’ layout algorithm on the imported graph. |
directory color |
(255, 255, 127, 255) |
input |
This parameter indicates the color used to display directories. |
|
other color |
(85, 170, 255, 255) |
input |
This parameter indicates the color used to display other files. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('File System Directory')
# set any input parameter value if needed
# params['directory'] = ...
# params['include hidden files'] = ...
# params['follow symlinks'] = ...
# params['icons'] = ...
# params['tree layout'] = ...
# params['directory color'] = ...
# params['other color'] = ...
graph = tlp.importGraph('File System Directory', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Fu and Liao Model¶
Description¶
Randomly generates a scale-free graph using
Peihua Fu and Kun Liao.
An evolving scale-free network with large clustering coefficient.
In ICARCV, pp. 1-4. IEEE, (2006).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
m |
|
5 |
input |
Number of nodes added at each time step. |
delta |
|
0.5 |
input |
Delta coefficient must belong to [0, 1] |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Fu and Liao Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['delta'] = ...
graph = tlp.importGraph('Fu and Liao Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GEXF¶
Description¶
Supported extensions: gexf
Imports a new graph from a file in the GEXF input format
as it is described in the XML Schema 1.2 draft
(<a href=”http://gexf.net/format/schema.html”>http://gexf.net/format/schema.html</a>).
Warning: dynamic mode is not supported.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
This parameter defines the pathname of the GEXF file to import. |
|
Curved edges |
|
|
input |
Indicates if Bézier curves should be used to draw the edges. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GEXF')
# set any input parameter value if needed
# params['filename'] = ...
# params['Curved edges'] = ...
graph = tlp.importGraph('GEXF', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GML¶
Description¶
Supported extension: gml
Imports a new graph from a file (.gml) in the GML input format (used by Graphlet).<p/>See <a href=”http://www.infosun.fim.uni-passau.de/Graphlet/GML/gml-tr.html”>http://www.infosun.fmi.uni-passau.de/Graphlet/GML/gml-tr.html</a> for details.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The pathname of the GML file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GML')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('GML', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GraphML¶
Description¶
Supported extension: graphml
Imports a graph from a file in the GraphML format (<a href=”http://graphml.graphdrawing.org/”>http://graphml.graphdrawing.org</a>). GraphML is a comprehensive and easy-to-use file format for graphs. It consists of a language core to describe the structural properties of a graph and a flexible extension mechanism to add application-specific data.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The GraphML file to import |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('GraphML')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('GraphML', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Grid¶
Description¶
Imports a new grid structured graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
width |
|
10 |
input |
Grid node width. |
height |
|
10 |
input |
Grid node height. |
connectivity |
4 |
input |
Connectivity number of each node. |
|
oppositeNodesConnected |
|
|
input |
If true, opposite nodes on each side of the grid are connected. In a 4 connectivity the resulting object is a torus. |
spacing |
|
1.0 |
input |
Spacing between nodes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Grid')
# set any input parameter value if needed
# params['width'] = ...
# params['height'] = ...
# params['connectivity'] = ...
# params['oppositeNodesConnected'] = ...
# params['spacing'] = ...
graph = tlp.importGraph('Grid', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Grid Approximation¶
Description¶
Imports a new grid approximation graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
200 |
input |
Number of nodes in the final graph. |
degree |
|
10 |
input |
Average degree of the nodes in the final graph. |
long edge |
|
|
input |
If true, long distance edges are added in the grid approximation. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Grid Approximation')
# set any input parameter value if needed
# params['nodes'] = ...
# params['degree'] = ...
# params['long edge'] = ...
graph = tlp.importGraph('Grid Approximation', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Guillaume Latapy Model¶
Description¶
Randomly generates a small word graph using the model described in
J.-L. Guillaume and M. Latapy.
Bipartite graphs as models of complex networks.
In Workshop on Combinatorial and Algorithmic Aspects of Networking (CAAN), LNCS, volume 1, 2004.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
200 |
input |
This parameter defines the amount of nodes used to build the small-world graph. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Guillaume Latapy Model')
# set any input parameter value if needed
# params['nodes'] = ...
graph = tlp.importGraph('Guillaume Latapy Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Holme and Kim Model¶
Description¶
Randomly generates a scale-free graph using the model described in
Petter Holme and Beom Jun Kim.
Growing scale-free networks with tunable clustering.
Physical Review E, 65, 026107, (2002).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
m |
|
5 |
input |
Number of edges added at each time step. |
p |
|
0.5 |
input |
Probability of adding a triangle after adding a random edge. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Holme and Kim Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['p'] = ...
graph = tlp.importGraph('Holme and Kim Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
JSON Import¶
Description¶
Supported extensions: json
Imports a graph recorded in a file using the Tulip JSON format.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The pathname of the TLP JSON file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('JSON Import')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('JSON Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Klemm Eguiluz Model¶
Description¶
Randomly generates a small world graph using the model described in
Konstantin Klemm and Victor M. Eguiluz.
Growing Scale-Free Networks with Small World Behavior.
Physical Review E, 65, 057102,(2002).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
200 |
input |
Number of nodes. |
m |
|
10 |
input |
Number of activated nodes. |
mu |
|
0.5 |
input |
Probability to connect a node to a random other node |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Klemm Eguiluz Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['m'] = ...
# params['mu'] = ...
graph = tlp.importGraph('Klemm Eguiluz Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Liu et al. model¶
Description¶
Randomly generates a small world graph using the model described in
J.-G. Liu, Y.-Z. Dang, and Z. tuo Wang.
Multistage random growing small-world networks with power-law degree distribution.
Chinese Phys. Lett., 23(3):746, Oct. 31 2005.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Liu et al. model')
# set any input parameter value if needed
# params['nodes'] = ...
graph = tlp.importGraph('Liu et al. model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Npm package dependencies graph¶
Description¶
Import the packages dependencies graph from a npm package. Be sure to have called ‘npm install’ in the package directory first in order to get the complete dependencies graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
npm package dir |
directory pathname |
input |
The root directory of the npm package |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Npm package dependencies graph')
# set any input parameter value if needed
# params['npm package dir'] = ...
graph = tlp.importGraph('Npm package dependencies graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Pajek¶
Description¶
Supported extensions: net, paj
Imports a new graph from a file (.net) in Pajek NET format
as it is described in the Pajek manual (<a href=”http://mrvar.fdv.uni-lj.si/pajek/pajekman.pdf”>http://mrvar.fdv.uni-lj.si/pajek/pajekman.pdf</a>)
Warning: the description of the edges with Matrix (adjacency lists)is not yet supported.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
This parameter indicates the pathname of the Pajek file (.net or .paj) to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Pajek')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('Pajek', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Planar Graph¶
Description¶
Imports a new randomly generated planar graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
30 |
input |
Number of nodes in the final graph. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Planar Graph')
# set any input parameter value if needed
# params['nodes'] = ...
graph = tlp.importGraph('Planar Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Random General Graph¶
Description¶
Imports a new randomly generated graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
500 |
input |
Number of nodes in the final graph. |
edges |
|
1000 |
input |
Number of edges in the final graph. |
directed |
|
False |
input |
If True, the graph may contain edges a->b and b->a. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random General Graph')
# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...
# params['directed'] = ...
graph = tlp.importGraph('Random General Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Random General Tree¶
Description¶
Imports a new randomly generated tree.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Minimum size |
|
10 |
input |
Minimal number of nodes in the tree. |
Maximum size |
|
100 |
input |
Maximal number of nodes in the tree. |
Maximal node’s degree |
|
5 |
input |
Maximal degree of the nodes. |
tree layout |
|
|
input |
If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random General Tree')
# set any input parameter value if needed
# params['Minimum size'] = ...
# params['Maximum size'] = ...
# params['Maximal node's degree'] = ...
# params['tree layout'] = ...
graph = tlp.importGraph('Random General Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Random Simple Graph¶
Description¶
Imports a new randomly generated simple graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
500 |
input |
Number of nodes in the final graph. |
edges |
|
1000 |
input |
Number of edges in the final graph. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Random Simple Graph')
# set any input parameter value if needed
# params['nodes'] = ...
# params['edges'] = ...
graph = tlp.importGraph('Random Simple Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
TLP Import¶
Description¶
Supported extensions: tlp, tlpz (compressed), tlp.gz (compressed)
Imports a graph recorded in a file using the TLP format (Tulip Software Graph Format).
See <a href=”http://tulip.labri.fr/TulipDrupal/?q=tlp-file-format”>http://tulip.labri.fr->Framework->TLP File Format</a> for description.
Note: When using the Tulip graphical user interface,
choosing File->Import->TLP menu item is the same as using File->Open menu item.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The pathname of the TLP file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('TLP Import')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('TLP Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
TLPB Import¶
Description¶
Supported extensions: tlpb, tlpb.gz (compressed), tlpbz (compressed)
Imports a graph recorded in a file using the Tulip binary format.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The pathname of the TLPB file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('TLPB Import')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('TLPB Import', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
UCINET¶
Description¶
Supported extensions: txt
Imports a new graph from a text file in UCINET DL input format
as it is described in the UCINET reference manual
(see <a href=”http://www.analytictech.com/ucinet/documentation/reference.rtf”>http://www.analytictech.com/ucinet/documentation/reference.rtf</a>)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
This parameter indicates the pathname of the file in UCINET DL format to import. |
|
Default metric |
|
weight |
input |
This parameter indicates the name of the default metric. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('UCINET')
# set any input parameter value if needed
# params['filename'] = ...
# params['Default metric'] = ...
graph = tlp.importGraph('UCINET', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Uniform Random Binary Tree¶
Description¶
Imports a new randomly generated uniform binary tree.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Minimum size |
|
50 |
input |
Minimal number of nodes in the tree. |
Maximum size |
|
60 |
input |
Maximal number of nodes in the tree. |
tree layout |
|
|
input |
If true, the generated tree is drawn with the ‘Tree Leaf’ layout algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Uniform Random Binary Tree')
# set any input parameter value if needed
# params['Minimum size'] = ...
# params['Maximum size'] = ...
# params['tree layout'] = ...
graph = tlp.importGraph('Uniform Random Binary Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Wang and Rong Model¶
Description¶
Randomly generates a small-world graph using the model described in
Jianwei Wang and Lili Rong.
Evolving small-world networks based on the modified BA model.
International Conference on Computer Science and Information Technology, 0, 143-146, (2008).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
m0 |
|
5 |
input |
Number of nodes in the initial ring. |
m |
|
5 |
input |
Number of nodes added at each time step. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Wang and Rong Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['m0'] = ...
# params['m'] = ...
graph = tlp.importGraph('Wang and Rong Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Wang et al. Model¶
Description¶
Randomly generates a small world graph using the model described in
L.Wang, F. Du, H. P. Dai, and Y. X. Sun.
Random pseudofractal scale-free networks with small-world effect.
The European Physical Journal B - Condensed Matter and Complex Systems, 53, 361-366, (2006).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
300 |
input |
Number of nodes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Wang et al. Model')
# set any input parameter value if needed
# params['nodes'] = ...
graph = tlp.importGraph('Wang et al. Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Watts Strogatz Model¶
Description¶
Randomly generates a small world graph using the model described in
D. J. Watts and S. H. Strogatz.
Collective dynamics of small-world networks.
Nature 393, 440 (1998).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
nodes |
|
200 |
input |
This parameter defines the amount of nodes used to build the scale-free graph. |
k |
|
3 |
input |
Number of edges added to each node in the initial ring lattice. Be careful that #nodes > k > ln(#nodes) |
p |
|
0.02 |
input |
Probability in [0,1] to rewire an edge. |
original model |
|
|
input |
Use the original model: k describes the degree of each vertex (k > 1 and even). |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Watts Strogatz Model')
# set any input parameter value if needed
# params['nodes'] = ...
# params['k'] = ...
# params['p'] = ...
# params['original model'] = ...
graph = tlp.importGraph('Watts Strogatz Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Web Site¶
Description¶
Imports a new graph from Web site structure (one node per page).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
server |
|
www.labri.fr |
input |
This parameter defines the web server that you want to inspect. No need for http:// at the beginning; http protocol is always assumed. No need for / at the end. |
web page |
|
input |
This parameter defines the first web page to visit. No need for / at the beginning. |
|
max size |
|
1000 |
input |
This parameter defines the maximum number of nodes (different pages) allowed in the extracted graph. |
non http links |
|
|
input |
This parameter indicates if non http links (https, ftp, mailto…) have to be extracted. |
other server |
|
|
input |
This parameter indicates if links or redirection to other server pages have to be followed. |
compute layout |
|
|
input |
This parameter indicates if a layout of the extracted graph has to be computed. |
page color |
(240, 0, 120, 128) |
input |
This parameter indicates the color used to display nodes. |
|
link color |
(96,96,191,128) |
input |
This parameter indicates the color used to display links. |
|
redirection color |
(191,175,96,128) |
input |
This parameter indicates the color used to display redirections. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('Web Site')
# set any input parameter value if needed
# params['server'] = ...
# params['web page'] = ...
# params['max size'] = ...
# params['non http links'] = ...
# params['other server'] = ...
# params['compute layout'] = ...
# params['page color'] = ...
# params['link color'] = ...
# params['redirection color'] = ...
graph = tlp.importGraph('Web Site', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
graphviz¶
Description¶
Supported extensions: dot
Imports a new graph from a file in the dot input format.
(see <a href=”https://www.graphviz.org/doc/info/lang.html”>https://www.graphviz.org/doc/info/lang.html</a>)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
filename |
file pathname |
input |
The dot file to import. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
params = tlp.getDefaultPluginParameters('graphviz')
# set any input parameter value if needed
# params['filename'] = ...
graph = tlp.importGraph('graphviz', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Labeling¶
To call these plugins, you must use the tlp.Graph.applyStringAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
To labels¶
Description¶
Maps the labels of the graph elements onto the values of a given property.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
input |
viewMetric |
input |
Property to stringify values on labels. |
|
selection |
input |
Set of elements for which to set the labels. |
||
nodes |
|
|
input |
Sets labels on nodes. |
edges |
|
|
input |
Set labels on edges. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('To labels', graph)
# set any input parameter value if needed
# params['input'] = ...
# params['selection'] = ...
# params['nodes'] = ...
# params['edges'] = ...
# either create or get a string property from the graph to store the result of the algorithm
resultString = graph.getStringProperty('resultString')
success = graph.applyStringAlgorithm('To labels', resultString, params)
# or store the result of the algorithm in the default Tulip string property named 'viewLabel'
success = graph.applyStringAlgorithm('To labels', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Layout¶
To call these plugins, you must use the tlp.Graph.applyLayoutAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
3-Connected (Tutte)¶
Description¶
Implements the Tutte layout for 3-Connected graph algorithm first published as:
How to Draw a Graph , W.T. Tutte, Proc. London Math. Soc. pages 743–768 (1963).
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('3-Connected (Tutte)', graph)
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('3-Connected (Tutte)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('3-Connected (Tutte)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Balloon (OGDF)¶
Description¶
Computes a radial (balloon) layout based on a spanning tree.
The algorithm is partially based on the papers:
On Balloon Drawings of Rooted Trees by Lin and Yen
Interacting with Huge Hierarchies: Beyond Cone Trees by Carriere and Kazman.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Even angles |
|
|
input |
Subtrees may be assigned even angles or angles depending on their size. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Balloon (OGDF)', graph)
# set any input parameter value if needed
# params['Even angles'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Balloon (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Balloon (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Bertault (OGDF)¶
Description¶
Computes a force directed layout (Bertault Layout) for preserving the planar embedding in the graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
impred |
|
|
input |
Sets impred option. |
iterno |
|
20 |
input |
The number of iterations. If <=0, the number of iterations will be set as 10 times the number of nodes. |
reqlength |
|
0.0 |
input |
The required edge length. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bertault (OGDF)', graph)
# set any input parameter value if needed
# params['impred'] = ...
# params['iterno'] = ...
# params['reqlength'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bertault (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bertault (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Bubble Pack¶
Description¶
Stable
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
complexity |
|
|
input |
This parameter enables to choose the complexity of the algorithm, true = o(nlog(n)) / false = o(n) |
node size |
viewSize |
input |
This parameter defines the property used for node’s sizes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bubble Pack', graph)
# set any input parameter value if needed
# params['complexity'] = ...
# params['node size'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bubble Pack', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bubble Pack', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Bubble Tree¶
Description¶
Implement the bubble tree drawing algorithm first published as:
Bubble Tree Drawing Algorithm , S. Grivet, D. Auber, J-P Domenger and Guy Melancon, Computer Vision and Graphics. Computational Imaging and Vision, vol 32, 2006. Springer, Dordrecht, doi: <a href=”https://doi.org/10.1007/1-4020-4179-9_91”>10.1007/1-4020-4179-9_91</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
complexity |
|
|
input |
This parameter enables to choose the complexity of the algorithm.If true, the complexity is O(n.log(n)), if false it is O(n). |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Bubble Tree', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['complexity'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Bubble Tree', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Bubble Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Circular¶
Description¶
Implements a circular layout that takes node size into account.
It manages size of nodes and use a standard dfs for ordering nodes or search the maximum length cycle.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
search cycle |
|
|
input |
If true, search first for the maximum length cycle (be careful, this problem is NP-Complete). If false, nodes are ordered using a depth first search. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Circular', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['search cycle'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Circular', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Circular', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Circular (OGDF)¶
Description¶
Implements a circular layout based on the following publication:Ugur Dogrusöz, Brendan Madden, Patrick Madden: Circular Layout in the Graph Layout Toolkit.Proc. Graph Drawing 1996, LNCS 1190, pp. 92-100, 1997.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
minDistCircle |
|
20 |
input |
The minimal distance between nodes on a circle. |
minDistLevel |
|
20 |
input |
The minimal distance between father and child circle. |
minDistSibling |
|
10 |
input |
The minimal distance between circles on same level. |
minDistCC |
|
20 |
input |
The minimal distance between connected components. |
pageRatio |
|
1 |
input |
The page ratio used for packing connected components. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Circular (OGDF)', graph)
# set any input parameter value if needed
# params['minDistCircle'] = ...
# params['minDistLevel'] = ...
# params['minDistSibling'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Circular (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Circular (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Cone Tree¶
Description¶
Implements an extension of the Cone tree layout algorithm first published as:
Interacting with Huge Hierarchies: Beyond Cone Trees , A. FJ. Carriere and R. Kazman, InfoViz’95, IEEE Symposium on Information Visualization pages 74–78 (1995),doi: <a href=”https://dx.doi.org/10.1109/INFVIS.1995.528689”>10.1109/INFVIS.1995.528689</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
orientation |
vertical |
input |
This parameter enables to choose the orientation of the drawing. |
|
space between levels |
|
1.0 |
input |
This parameter enables to add extra spacing between the different levels of the tree |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Cone Tree', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['space between levels'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Cone Tree', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Cone Tree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Connected Component Packing¶
Description¶
Implements a layout packing of the connected components of a graph. It builds a layout of the graph connected components so that they do not overlap and minimizes the lost space (packing).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
coordinates |
viewLayout |
input |
Input layout of nodes and edges. |
|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
rotation |
viewRotation |
input |
Input rotation of nodes around the z-axis. |
|
complexity |
auto |
input |
Complexity of the algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component Packing', graph)
# set any input parameter value if needed
# params['coordinates'] = ...
# params['node size'] = ...
# params['rotation'] = ...
# params['complexity'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Connected Component Packing', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Connected Component Packing', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Connected Component Packing (Polyomino)¶
Description¶
Implements the connected component packing algorithm published as:
Disconnected Graph Layout and the Polyomino Packing Approach , Freivalds Karlis, Dogrusoz Ugur and Kikusts Paulis, 9th International Symposium on Graph Drawing 2001,LNCS Vol. 2265 (2002), pp 378-391, doi: <a href=”https://doi.org/10.1007/3-540-45848-4_30”>https://doi.org/10.1007/3-540-45848-4_30</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
coordinates |
viewLayout |
input |
Input layout of nodes and edges. |
|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
rotation |
viewRotation |
input |
Input rotation of nodes on z-axis |
|
margin |
|
1 |
input |
The minimum margin between each pair of nodes in the resulting packed layout. |
increment |
|
1 |
input |
The polyomino packing tries to find a place where the next polyomino will fit by following a square.If there is no place where the polyomino fits, the square gets bigger and every place gets tried again. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component Packing (Polyomino)', graph)
# set any input parameter value if needed
# params['coordinates'] = ...
# params['node size'] = ...
# params['rotation'] = ...
# params['margin'] = ...
# params['increment'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Connected Component Packing (Polyomino)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Connected Component Packing (Polyomino)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Davidson Harel (OGDF)¶
Description¶
Implements the Davidson-Harel layout algorithm which uses simulated annealing to find a layout of minimal energy.
Due to this approach, the algorithm can only handle graphs of rather limited size.
It is based on the following publication:
Drawing Graphs Nicely Using Simulated Annealing , Ron Davidson, David Harel, ACM Transactions on Graphics 15(4), pp. 301-331, 1996.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Settings |
Standard |
input |
Fixes the cost values to special configurations. |
|
Speed |
Fast |
input |
More convenient way of setting the speed of the algorithm. Influences number of iterations per temperature step, starting temperature, and cooling factor. |
|
preferredEdgeLength |
|
0.0 |
input |
The preferred edge length. |
preferredEdgeLengthMultiplier |
|
2.0 |
input |
The preferred edge length multiplier for attraction. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Davidson Harel (OGDF)', graph)
# set any input parameter value if needed
# params['Settings'] = ...
# params['Speed'] = ...
# params['preferredEdgeLength'] = ...
# params['preferredEdgeLengthMultiplier'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Davidson Harel (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Davidson Harel (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Dendrogram¶
Description¶
This is an implementation of a dendrogram, an extended implementation of a Bio representation which includes variable orientation and variable node sizelayout.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
orientation |
up to down |
input |
Choose a desired orientation. |
|
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dendrogram', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Dendrogram', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Dendrogram', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Dominance (OGDF)¶
Description¶
Implements a simple upward drawing algorithm based on dominance drawings of st-digraphs.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
minimum grid distance |
|
1 |
input |
The minimum grid distance. |
transpose |
|
|
input |
If true, transpose the layout vertically. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dominance (OGDF)', graph)
# set any input parameter value if needed
# params['minimum grid distance'] = ...
# params['transpose'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Dominance (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Dominance (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
FM^3 (OGDF)¶
Description¶
Implements the FM³ layout algorithm by Hachul and Jünger. It is a multilevel, force-directed layout algorithm that can be applied to very large graphs.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Edge Length Property |
viewMetric |
input |
A numeric property containing unit edge length to use. |
|
Node Size |
viewSize |
input |
The node sizes. |
|
Unit edge length |
|
10.0 |
input |
The unit edge length. |
New initial placement |
|
|
input |
Indicates the initial placement before running algorithm. |
Fixed iterations |
|
30 |
input |
The fixed number of iterations for the stop criterion. |
Threshold |
|
0.01 |
input |
The threshold for the stop criterion. |
Page Format |
Square |
input |
Possible page formats. |
|
Quality vs Speed |
BeautifulAndFast |
input |
Trade-off between run-time and quality. |
|
Edge Length Measurement |
BoundingCircle |
input |
Specifies how the length of an edge is measured. |
|
Allowed Positions |
Integer |
input |
Specifies which positions for a node are allowed. |
|
Tip Over |
NoGrowingRow |
input |
Specifies in which case it is allowed to tip over drawings of connected components. |
|
Pre Sort |
DecreasingHeight |
input |
Specifies how connected components are sorted before the packing algorithm is applied. |
|
Galaxy Choice |
NonUniformProbLowerMass |
input |
Specifies how sun nodes of galaxies are selected. |
|
Max Iter Change |
LinearlyDecreasing |
input |
Specifies how MaxIterations is changed in subsequent multilevels. |
|
Initial Placement Mult |
Advanced |
input |
Specifies how the initial placement is generated. |
|
Force Model |
New |
input |
Specifies the force-model. |
|
Repulsive Force Method |
NMM |
input |
Specifies how to calculate repulsive forces. |
|
Initial Placement Forces |
RandomRandIterNr |
input |
Specifies how the initial placement is done. |
|
Reduced Tree Construction |
SubtreeBySubtree |
input |
Specifies how the reduced bucket quadtree is constructed. |
|
Smallest Cell Finding |
Iteratively |
input |
Specifies how to calculate the smallest quadratic cell surrounding particles of a node in the reduced bucket quadtree. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('FM^3 (OGDF)', graph)
# set any input parameter value if needed
# params['Edge Length Property'] = ...
# params['Node Size'] = ...
# params['Unit edge length'] = ...
# params['New initial placement'] = ...
# params['Fixed iterations'] = ...
# params['Threshold'] = ...
# params['Page Format'] = ...
# params['Quality vs Speed'] = ...
# params['Edge Length Measurement'] = ...
# params['Allowed Positions'] = ...
# params['Tip Over'] = ...
# params['Pre Sort'] = ...
# params['Galaxy Choice'] = ...
# params['Max Iter Change'] = ...
# params['Initial Placement Mult'] = ...
# params['Force Model'] = ...
# params['Repulsive Force Method'] = ...
# params['Initial Placement Forces'] = ...
# params['Reduced Tree Construction'] = ...
# params['Smallest Cell Finding'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('FM^3 (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('FM^3 (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Fast Multipole Embedder (OGDF)¶
Description¶
Implements the fast multipole embedder layout algorithm of Martin Gronemann. It uses the same repulsive forces as FM³ of Hachul and Jünger, but slightly modified attractive forces.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
number of iterations |
|
100 |
input |
The maximum number of iterations. |
number of coefficients |
|
5 |
input |
The number of coefficients for the expansions. |
randomize layout |
|
|
input |
If true, the initial layout will be randomized. |
default node size |
|
20.0 |
input |
The default node size. |
default edge length |
|
1.0 |
input |
The default edge length. |
number of threads |
|
2 |
input |
The number of threads to use during the computation of the layout. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Multipole Embedder (OGDF)', graph)
# set any input parameter value if needed
# params['number of iterations'] = ...
# params['number of coefficients'] = ...
# params['randomize layout'] = ...
# params['default node size'] = ...
# params['default edge length'] = ...
# params['number of threads'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Multipole Embedder (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Multipole Embedder (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Fast Multipole Multilevel Embedder (OGDF)¶
Description¶
The FMME layout algorithm is a variant of multilevel, force-directed layout, which utilizes various tools to speed up the computation.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
number of threads |
|
2 |
input |
The number of threads to use during the computation of the layout. |
multilevel nodes bound |
|
10 |
input |
The bound for the number of nodes in a multilevel step. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Multipole Multilevel Embedder (OGDF)', graph)
# set any input parameter value if needed
# params['number of threads'] = ...
# params['multilevel nodes bound'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Multipole Multilevel Embedder (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Multipole Multilevel Embedder (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Fast Overlap Removal¶
Description¶
Implements a layout algorithm removing nodes overlap first published as:
Fast Node Overlap Removal , Tim Dwyer, Kim Marriot, Peter J. Stuckey, Graph Drawing 2005, Vol. 3843 (2006), pp. 153-164, doi: <a href=”https://doi.org/10.1007/11618058_15”>10.1007/11618058_15</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
overlap removal type |
X-Y |
input |
Overlap removal type. |
|
layout |
viewLayout |
input |
The property used for the input layout of nodes and edges. |
|
bounding box |
viewSize |
input |
The property used for node sizes. |
|
rotation |
viewRotation |
input |
The property defining rotation angles of nodes around the z-axis. |
|
number of passes |
|
5 |
input |
The algorithm will be applied N times, each time increasing node size to attain original size at the final iteration. This greatly enhances the layout. |
x border |
|
0.0 |
input |
The minimal x border value that will separate the graph nodes after application of the algorithm. |
y border |
|
0.0 |
input |
The minimal y border value that will separate the graph nodes after application of the algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fast Overlap Removal', graph)
# set any input parameter value if needed
# params['overlap removal type'] = ...
# params['layout'] = ...
# params['bounding box'] = ...
# params['rotation'] = ...
# params['number of passes'] = ...
# params['x border'] = ...
# params['y border'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fast Overlap Removal', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fast Overlap Removal', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Fruchterman Reingold (OGDF)¶
Description¶
Implements the Fruchterman and Reingold layout algorithm, first published as:
Graph Drawing by Force-Directed Placement , Fruchterman, Thomas M. J., Reingold, Edward M., Software – Practice & Experience (Wiley) Volume 21, Issue 11, pages 1129–1164, (1991)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
iterations |
|
1000 |
input |
The number of iterations. |
noise |
|
|
input |
Sets the parameter noise. |
use node weights |
|
|
input |
Indicates if the node weights have to be used. |
node weights |
viewMetric |
input |
The metric containing node weights. |
|
Cooling function |
Factor |
input |
Sets the parameter cooling function |
|
ideal edge length |
|
10.0 |
input |
The ideal edge length. |
minDistCC |
|
20.0 |
input |
The minimal distance between connected components. |
pageRatio |
|
1.0 |
input |
The page ratio used for packing connected components. |
check convergence |
|
|
input |
Indicates if the convergence has to be checked. |
convergence tolerance |
|
0.01 |
input |
The convergence tolerance parameter. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Fruchterman Reingold (OGDF)', graph)
# set any input parameter value if needed
# params['iterations'] = ...
# params['noise'] = ...
# params['use node weights'] = ...
# params['node weights'] = ...
# params['Cooling function'] = ...
# params['ideal edge length'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# params['check convergence'] = ...
# params['convergence tolerance'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Fruchterman Reingold (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Fruchterman Reingold (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GEM (Frick)¶
Description¶
Implements the GEM-2d layout algorithm first published as:
A fast, adaptive layout algorithm for undirected graphs , A. Frick, A. Ludwig, and H. Mehldau, Graph Drawing’94, Volume 894 of Lecture Notes in Computer Science (1995), doi: <a href=”https://doi.org/10.1007/3-540-58950-3_393”>10.1007/3-540-58950-3_393</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
3D layout |
|
|
input |
If true, the layout is in 3D else it is computed in 2D. |
edge length |
input |
This metric is used to compute the length of edges. |
||
initial layout |
input |
The layout property used to compute the initial position of the graph elements. If none is given the initial position will be computed by the algorithm. |
||
unmovable nodes |
input |
This property is used to indicate the unmovable nodes, the ones for which a new position will not be computed by the algorithm. This property is taken into account only if a layout property has been given to get the initial position of the unmovable nodes. |
||
max iterations |
|
0 |
input |
This parameter allows to choose the number of iterations. The default value of 0 corresponds to (3 * nb_nodes * nb_nodes) if the graph has more than 100 nodes. For smaller graph, the number of iterations is set to 30 000. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GEM (Frick)', graph)
# set any input parameter value if needed
# params['3D layout'] = ...
# params['edge length'] = ...
# params['initial layout'] = ...
# params['unmovable nodes'] = ...
# params['max iterations'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GEM (Frick)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GEM (Frick)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GEM Frick (OGDF)¶
Description¶
Implements the GEM-2d layout algorithm first published as:
A fast, adaptive layout algorithm for undirected graphs , A. Frick, A. Ludwig, and H. Mehldau, Graph Drawing’94, Volume 894 of Lecture Notes in Computer Science (1995).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
number of rounds |
|
30000 |
input |
The maximal number of rounds per node. |
minimal temperature |
|
0.005 |
input |
The minimal temperature. |
initial temperature |
|
12.0 |
input |
The initial temperature to x; must be >= minimalTemperature. |
gravitational constant |
|
0.0625 |
input |
Gravitational constant parameter. |
desired length |
|
5.0 |
input |
The desired edge length to x; must be >= 0. |
maximal disturbance |
|
0.0 |
input |
The maximal disturbance to x; must be >= 0. |
rotation angle |
|
1.04719755 |
input |
The opening angle for rotations to x (0 <= x <= pi / 2). |
oscillation angle |
|
1.57079633 |
input |
Sets the opening angle for oscillations to x (0 <= x <= pi / 2). |
rotation sensitivity |
|
0.01 |
input |
The rotation sensitivity to x (0 <= x <= 1). |
oscillation sensitivity |
|
0.3 |
input |
The oscillation sensitivity to x (0 <= x <= 1). |
Attraction formula |
Fruchterman/Reingold |
input |
The formula for attraction. |
|
minDistCC |
|
20 |
input |
The minimal distance between connected components. |
pageRatio |
|
1.0 |
input |
The page ratio used for packing connected components. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GEM Frick (OGDF)', graph)
# set any input parameter value if needed
# params['number of rounds'] = ...
# params['minimal temperature'] = ...
# params['initial temperature'] = ...
# params['gravitational constant'] = ...
# params['desired length'] = ...
# params['maximal disturbance'] = ...
# params['rotation angle'] = ...
# params['oscillation angle'] = ...
# params['rotation sensitivity'] = ...
# params['oscillation sensitivity'] = ...
# params['Attraction formula'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GEM Frick (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GEM Frick (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
GRIP¶
Description¶
Implements a force directed graph drawing algorithm first published as:
GRIP: Graph dRawing with Intelligent Placement , P. Gajer and S.G. Kobourov, Graph Drawing (GD) 2000, Lecture Notes in Computer Science, vol 1984. Springer, Berlin, Heidelberg. doi: <a href=”https://doi.org/10.1007/3-540-44541-2_21”>10.1007/3-540-44541-2_21</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
3D layout |
|
|
input |
If true the layout is in 3D else it is computed in 2D |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('GRIP', graph)
# set any input parameter value if needed
# params['3D layout'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('GRIP', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('GRIP', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
H3¶
Description¶
Implements the H3 layout technique for drawing large directed graphs as
node-link diagrams in 3D hyperbolic space. That algorithm can lay out much
larger structures than can be handled using traditional techniques
for drawing general graphs because it assumes a hierarchical nature
of the data.
It was first published as:
H3: Laying out Large Directed Graphs
in 3D Hyperbolic Space , Tamara Munzner, Proceedings of the 1997 IEEE
Symposium on Information Visualization, Phoenix, AZ, pp 2-10, 1997.
The implementation in Python (MIT License) has been written by
BuzzFeed engineers (https://github.com/buzzfeed/pyh3).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layout scaling |
|
1000 |
input |
the scale factor to apply to the computed layout |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('H3', graph)
# set any input parameter value if needed
# params['layout scaling'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('H3', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('H3', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Hierarchical Graph¶
Description¶
Implements the hierarchical layout algorithm first published as:
Tulip - A Huge Graph Visualization Framework , D. Auber, Book. Graph Drawing Software. (Ed. Michael Junger & Petra Mutzel) pages 105–126. (2004).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
orientation |
horizontal |
input |
This parameter enables to choose the orientation of the drawing. |
|
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical Graph', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Hierarchical Graph', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Hierarchical Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Hierarchical Tree (R-T Extended)¶
Description¶
Implements the hierarchical tree layout algorithm first published as:
Tidier Drawings of Trees , E.M. Reingold and J.S. Tilford, IEEE Transactions on Software Engineering pages 223–228 (1981), doi: <a href=”https://doi.org/10.1109/TSE.1981.234519”>doi.org/10.1109/TSE.1981.234519</a>.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
edge length |
input |
This parameter indicates the property used to compute the length of edges. |
||
orientation |
vertical |
input |
This parameter enables to choose the orientation of the drawing. |
|
orthogonal |
|
|
input |
This parameter enables to choose if the tree is drawn orthogonally or not. |
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
|
bounding circles |
|
|
input |
Indicates if the node bounding objects are boxes or bounding circles. |
compact layout |
|
|
input |
Indicates if a compact layout is computed. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Hierarchical Tree (R-T Extended)', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['edge length'] = ...
# params['orientation'] = ...
# params['orthogonal'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# params['bounding circles'] = ...
# params['compact layout'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Hierarchical Tree (R-T Extended)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Hierarchical Tree (R-T Extended)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Improved Walker¶
Description¶
It is a linear implementation of the Walker’s tree layout improved algorithm published as:
Improving Walker’s Algorithm to Run in Linear Time.
Buchheim C., Jünger M., Leipert S. (2002), In: Goodrich M.T., Kobourov S.G. (eds) Graph Drawing (GD) 2002, Lecture Notes in Computer Science, vol 2528. Springer, Berlin, Heidelberg. <a href=”https://doi.org/10.1007/3-540-36151-0_32”>10.1007/3-540-36151-0_32</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
orientation |
up to down |
input |
Choose a desired orientation. |
|
orthogonal |
|
|
input |
If true then use orthogonal edges. |
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Improved Walker', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['orthogonal'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Improved Walker', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Improved Walker', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Improved Walker (OGDF)¶
Description¶
Implements a linear-time tree layout algorithm with straight-line or orthogonal edge routing.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
siblings distance |
|
20 |
input |
The minimal required horizontal distance between siblings. |
subtrees distance |
|
20 |
input |
The minimal required horizontal distance between subtrees. |
levels distance |
|
50 |
input |
The minimal required vertical distance between levels. |
trees distance |
|
50 |
input |
The minimal required horizontal distance between trees in the forest. |
orthogonal layout |
|
|
input |
Indicates whether orthogonal edge routing style is used or not. |
Orientation |
topToBottom |
input |
This parameter indicates the orientation of the layout. |
|
Root selection |
Source |
input |
This parameter indicates how the root is selected. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Improved Walker (OGDF)', graph)
# set any input parameter value if needed
# params['siblings distance'] = ...
# params['subtrees distance'] = ...
# params['levels distance'] = ...
# params['trees distance'] = ...
# params['orthogonal layout'] = ...
# params['Orientation'] = ...
# params['Root selection'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Improved Walker (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Improved Walker (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Kamada Kawai (OGDF)¶
Description¶
Implements the Kamada-Kawai layout algorithm.
It is a force-directed layout algorithm that tries to place vertices with a distance corresponding to their graph theoretic distance.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
stop tolerance |
|
0.001 |
input |
The value for the stop tolerance, below which the system is regarded stable (balanced) and the optimization stopped. |
used layout |
|
|
input |
If set to true, the given layout is used for the initial positions. |
zero length |
|
0 |
input |
If set != 0, value zerolength is used to determine the desirable edge length by L = zerolength / max distance_ij. Otherwise, zerolength is determined using the node number and sizes. |
edge length |
|
0 |
input |
The desirable edge length. |
compute max iterations |
|
|
input |
If set to true, the number of iterations is computed depending on G. |
global iterations |
|
50 |
input |
The number of global iterations. |
local iterations |
|
50 |
input |
The number of local iterations. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Kamada Kawai (OGDF)', graph)
# set any input parameter value if needed
# params['stop tolerance'] = ...
# params['used layout'] = ...
# params['zero length'] = ...
# params['edge length'] = ...
# params['compute max iterations'] = ...
# params['global iterations'] = ...
# params['local iterations'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Kamada Kawai (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Kamada Kawai (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
LinLog¶
Description¶
Implements the LinLog layout algorithm, an energy model layout algorithm, first published as:
Energy Models for Graph Clustering , Andreas Noack., Journal of Graph Algorithms and Applications 11(2):453-480, 2007, doi: <a href=”https://dx.doi.org/10.7155/jgaa.00154”>10.7155/jgaa.00154</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
3D layout |
|
|
input |
If true the layout is in 3D else it is computed in 2D |
octtree |
|
|
input |
If true, use the OctTree optimization |
edge weight |
input |
This property is used to compute the length of edges. |
||
max iterations |
|
100 |
input |
This parameter allows to limit the number of iterations. The value of 0 corresponds to a default value of 100. |
repulsion exponent |
|
0.0 |
input |
This parameter allows to set the exponent of attraction. |
attraction exponent |
|
1.0 |
input |
This parameter allows to set the exponent of repulsion. |
gravitation factor |
|
0.05 |
input |
This parameter allows to set the factor of gravitation. |
skip nodes |
input |
This boolean property is used to skip nodes in computation when their value are set to true. |
||
initial layout |
input |
The layout property used to compute the initial position of the graph elements. If none is given the initial position will be computed by the algorithm. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('LinLog', graph)
# set any input parameter value if needed
# params['3D layout'] = ...
# params['octtree'] = ...
# params['edge weight'] = ...
# params['max iterations'] = ...
# params['repulsion exponent'] = ...
# params['attraction exponent'] = ...
# params['gravitation factor'] = ...
# params['skip nodes'] = ...
# params['initial layout'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('LinLog', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('LinLog', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Mixed Model¶
Description¶
Implements the planar polyline graph drawing algorithm, the mixed model algorithm, first published as:
Planar Polyline Drawings with Good Angular Resolution , C. Gutwenger and P. Mutzel, LNCS, Vol. 1547 pages 167–182 (1999), doi: <a href=”https://doi.org/10.1007/3-540-37623-2_13”>https://doi.org/10.1007/3-540-37623-2_13</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input / output |
This parameter defines the property used for node sizes. |
|
orientation |
vertical |
input |
This parameter enables to choose the orientation of the drawing. |
|
y node-node spacing |
|
2 |
input |
This parameter defines the minimum y-spacing between any two nodes. |
x node-node and edge-node spacing |
|
2 |
input |
This parameter defines the minimum x-spacing between any two nodes or between a node and an edge. |
shape property |
viewShape |
output |
This parameter defines the property holding edges shapes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Mixed Model', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['y node-node spacing'] = ...
# params['x node-node and edge-node spacing'] = ...
# params['shape property'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Mixed Model', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Mixed Model', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Node Respecter (OGDF)¶
Description¶
This is a force-directed layout algorithm respecting the shapes and sizes of nodes.It aims to minimize the number of node overlaps as well as the number of edges crossing through non-incident nodes.In order to achieve this, the algorithm adapts its forces to the node sizes and bends edges around close-by nodes.The edge bends are created by introducing dummy nodes into the graph, positioning all nodes according to forces acting upon them,filtering out unnecessary dummy nodes, and then replacing the remaining dummy nodes by edge bends.The algorithm is documented in and was developed for the bachelor thesis: Max Ilsen: Energy-Based Layout Algorithms for Graphs with Large Nodes. University of Osnabrueck, 2017
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
random initial placement |
|
|
input |
Use a random initial placement |
Post Processing |
None |
input |
Sets whether unnecessary edge bends should be filtered out in a post-processing step. |
|
Bends Normalization Angle |
|
3.141593 |
input |
Sets bends normalization angle in [0…Pi]. |
number of iterations |
|
30000 |
input |
The maximum number of iterations >=0. |
Minimal Temperature |
|
1.0 |
input |
The minimal Temperature >= 0 |
Initial Temperature |
|
10.0 |
input |
Sets the initial Temperature > Minimal Temperature. |
Temperature Decrease |
|
0.0 |
input |
Sets temperature Decrease Offset in [0…1]. |
Gravitation |
|
0.0625 |
input |
Sets Gravitation >= 0. |
Oscillation Angle |
|
1.570796 |
input |
Sets Oscillation Angle in [0…Pi]. |
Desired Minimal Edge Length |
|
20.000000 |
input |
Sets desired Min Edge Length > 0. |
Init Dummies Per Edge |
|
1 |
input |
Sets init Dummies Per Edge >= 0. |
Maximal Dummies Per Edge |
|
3 |
input |
Sets Dummies Per Edge > init Dummies Per Edge. |
Dummy Insertion Threshold |
|
5 |
input |
Sets dummy Insertion Threshold >= 1. |
Maximum Disturbance |
|
0 |
input |
Sets max Disturbance >= 0. |
Repulsion Distance |
|
40.000000 |
input |
Sets repulsion Distance >= 0. By default, it is the double of Desired Minimal Edge Length |
Min Distance CC |
|
30.000000 |
input |
Sets min Distance between CC >= 0. |
Page Ratio |
|
1.0 |
input |
Sets Page Ratio > 0. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Node Respecter (OGDF)', graph)
# set any input parameter value if needed
# params['random initial placement'] = ...
# params['Post Processing'] = ...
# params['Bends Normalization Angle'] = ...
# params['number of iterations'] = ...
# params['Minimal Temperature'] = ...
# params['Initial Temperature'] = ...
# params['Temperature Decrease'] = ...
# params['Gravitation'] = ...
# params['Oscillation Angle'] = ...
# params['Desired Minimal Edge Length'] = ...
# params['Init Dummies Per Edge'] = ...
# params['Maximal Dummies Per Edge'] = ...
# params['Dummy Insertion Threshold'] = ...
# params['Maximum Disturbance'] = ...
# params['Repulsion Distance'] = ...
# params['Min Distance CC'] = ...
# params['Page Ratio'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Node Respecter (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Node Respecter (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
OrthoTree¶
Description¶
Orthogonal Tree layout
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layer spacing |
|
10 |
input |
Define the spacing between two successive layers |
node spacing |
|
4 |
input |
Define the spacing between two nodes |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('OrthoTree', graph)
# set any input parameter value if needed
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('OrthoTree', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('OrthoTree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Perfect aspect ratio¶
Description¶
Scales the graph layout to get an aspect ratio of 1.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
layout |
viewLayout |
input |
The layout property from which a perfect aspect ratio has to be computed. |
|
Subgraph only |
|
|
input |
When applied on a subgraph, scales only the layout of this subgraph |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Perfect aspect ratio', graph)
# set any input parameter value if needed
# params['layout'] = ...
# params['Subgraph only'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Perfect aspect ratio', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Perfect aspect ratio', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Pivot MDS (OGDF)¶
Description¶
The Pivot MDS (multi-dimensional scaling) layout algorithm. By setting the number of pivots to infinity this algorithm behaves just like classical MDS. See:
Eigensolver methods for progressive multidimensional scaling of large data. Brandes and Pich
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
number of pivots |
|
250 |
input |
Sets the number of pivots. If the new value is smaller or equal 0 the default value (250) is used. |
use edge costs |
|
|
input |
Sets if the edge costs attribute has to be used. |
edge costs |
|
100 |
input |
Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default value (100) is used. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Pivot MDS (OGDF)', graph)
# set any input parameter value if needed
# params['number of pivots'] = ...
# params['use edge costs'] = ...
# params['edge costs'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Pivot MDS (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Pivot MDS (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Planarization Grid (OGDF)¶
Description¶
The planarization grid layout algorithm applies the planarization approach for crossing minimization, combined with the topology-shape-metrics approach for orthogonal planar graph drawing. It produces drawings with few crossings and is suited for small to medium sized sparse graphs. It uses a planar grid layout algorithm to produce a drawing on a grid.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
page ratio |
|
1.1 |
input |
Sets the option pageRatio. |
number of crossings |
|
output |
Returns the number of crossings in the computed layout |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planarization Grid (OGDF)', graph)
# set any input parameter value if needed
# params['page ratio'] = ...
# params['number of crossings'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Planarization Grid (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Planarization Grid (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Planarization Layout (OGDF)¶
Description¶
The planarization approach for drawing graphs.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
page ratio |
|
1.1 |
input |
Sets the option page ratio. |
minimal clique size |
|
3 |
input |
If preprocessing of cliques is considered, this option determines the minimal size of cliques to search for |
Embedder |
SimpleEmbedder |
input |
The result of the crossing minimization step is a planar graph, in which crossings are replaced by dummy nodes. The embedder then computes a planar embedding of this planar graph. |
|
number of crossings |
|
output |
Returns the number of crossings in the computed layout. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Planarization Layout (OGDF)', graph)
# set any input parameter value if needed
# params['page ratio'] = ...
# params['minimal clique size'] = ...
# params['Embedder'] = ...
# params['number of crossings'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Planarization Layout (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Planarization Layout (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Radial Tree (OGDF)¶
Description¶
The radial tree layout algorithm.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
levels distance |
|
50 |
input |
The minimal required vertical distance between levels. |
trees distance |
|
50 |
input |
The minimal required horizontal distance between trees in the forest. |
Root selection |
Source |
input |
This parameter indicates how the root is selected. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Radial Tree (OGDF)', graph)
# set any input parameter value if needed
# params['levels distance'] = ...
# params['trees distance'] = ...
# params['Root selection'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Radial Tree (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Radial Tree (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Random layout¶
Description¶
The positions of the graph nodes are randomly selected in a 1024x1024 square.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
3D layout |
|
|
input |
If true, the layout is computed in 3D, else it is computed in 2D. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Random layout', graph)
# set any input parameter value if needed
# params['3D layout'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Random layout', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Random layout', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Squarified Tree Map¶
Description¶
Implements a TreeMap and Squarified Treemap layout.
For Treemap see:
Tree visualization with treemaps: a 2-d space-filling approach , Shneiderman B., ACM Transactions on Graphics, vol. 11, 1 pages 92-99 (1992).
For Squarified Treemaps see:
Bruls, M., Huizing, K., & van Wijk, J. J. Proc. of Joint Eurographics and IEEE TCVG Symp. on Visualization (TCVG 2000) IEEE Press, pp. 33-42.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
viewMetric |
input |
This parameter defines the metric used to estimate the size allocated to each node. |
|
Aspect Ratio |
|
input |
This parameter enables to set up the aspect ratio (height/width) for the rectangle corresponding to the root node. |
|
Treemap Type |
|
|
input |
This parameter indicates to use normal Treemaps (B. Shneiderman) or Squarified Treemaps (J. J. van Wijk) |
Node Size |
viewSize |
output |
This parameter defines the property used as node sizes. |
|
Node Shape |
viewShape |
output |
This parameter defines the property used as node shapes. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Squarified Tree Map', graph)
# set any input parameter value if needed
# params['metric'] = ...
# params['Aspect Ratio'] = ...
# params['Treemap Type'] = ...
# params['Node Size'] = ...
# params['Node Shape'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Squarified Tree Map', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Squarified Tree Map', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Stress Minimization (OGDF)¶
Description¶
Implements an alternative to force-directed layout which is a distance-based layout realized by the stress minimization via majorization algorithm.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
terminationCriterion |
None |
input |
Tells which TERMINATION_CRITERIA should be used. |
|
fixXCoordinates |
|
|
input |
Tells whether the x coordinates are allowed to be modified or not. |
fixYCoordinates |
|
|
input |
Tells whether the y coordinates are allowed to be modified or not. |
fixZCoordinates |
|
|
input |
Tells whether the z coordinates are allowed to be modified or not. |
hasInitialLayout |
|
|
input |
Tells whether the current layout should be used or the initial layout needs to be computed. |
layoutComponentsSeparately |
|
|
input |
Sets whether the graph components should be layouted separately or a dummy distance should be used for nodes within different components. |
numberOfIterations |
|
200 |
input |
Sets a fixed number of iterations for stress majorization. If the new value is smaller or equal 0 the default value (200) is used. |
edgeCosts |
|
100 |
input |
Sets the desired distance between adjacent nodes. If the new value is smaller or equal 0 the default value (100) is used. |
useEdgeCostsProperty |
|
|
input |
Tells whether the edge costs are uniform or defined in an edge costs property. |
edgeCostsProperty |
viewMetric |
input |
The numeric property that holds the desired cost for each edge. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Stress Minimization (OGDF)', graph)
# set any input parameter value if needed
# params['terminationCriterion'] = ...
# params['fixXCoordinates'] = ...
# params['fixYCoordinates'] = ...
# params['fixZCoordinates'] = ...
# params['hasInitialLayout'] = ...
# params['layoutComponentsSeparately'] = ...
# params['numberOfIterations'] = ...
# params['edgeCosts'] = ...
# params['useEdgeCostsProperty'] = ...
# params['edgeCostsProperty'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Stress Minimization (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Stress Minimization (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Sugiyama (OGDF)¶
Description¶
Implements the classical layout algorithm by Sugiyama, Tagawa, and Toda. It is a layer-based approach for producing upward drawings.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
fails |
|
4 |
input |
The number of times that the number of crossings may not decrease after a complete top-down bottom-up traversal, before a run is terminated. |
runs |
|
15 |
input |
Determines, how many times the crossing minimization is repeated. Each repetition (except for the first) starts with randomly permuted nodes on each layer. Deterministic behaviour can be achieved by setting runs to 1. |
node distance |
|
3 |
input |
The minimal horizontal distance between two nodes on the same layer. |
layer distance |
|
3 |
input |
The minimal vertical distance between two nodes on neighboring layers. |
fixed layer distance |
|
|
input |
If true, the distance between neighboring layers is fixed, otherwise variable (only for FastHierarchyLayout). |
transpose |
|
|
input |
If this option is set to true an additional fine tuning step is performed after each traversal, which tries to reduce the total number of crossings by switching adjacent vertices on the same layer. |
arrangeCCs |
|
|
input |
If set to true connected components are laid out separately and the resulting layouts are arranged afterwards using the packer module. |
minDistCC |
|
20 |
input |
Specifies the spacing between connected components of the graph. |
pageRatio |
|
1.0 |
input |
The page ratio used for packing connected components. |
alignBaseClasses |
|
|
input |
Determines if base classes of inheritance hierarchies shall be aligned. |
alignSiblings |
|
|
input |
Sets the option alignSiblings. |
Ranking |
LongestPathRanking |
input |
Sets the option for the node ranking (layer assignment). |
|
Two-layer crossing minimization |
BarycenterHeuristic |
input |
Sets the module option for the two-layer crossing minimization. |
|
Layout |
FastHierarchyLayout |
input |
The hierarchy layout module that computes the final layout. |
|
transpose vertically |
|
|
input |
Transpose the layout vertically from top to bottom. |
Number of crossings |
|
output |
Returns the number of crossings in the computed layout. |
|
Number of levels/layers |
|
output |
Returns the number of layers/levels in the computed layout. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Sugiyama (OGDF)', graph)
# set any input parameter value if needed
# params['fails'] = ...
# params['runs'] = ...
# params['node distance'] = ...
# params['layer distance'] = ...
# params['fixed layer distance'] = ...
# params['transpose'] = ...
# params['arrangeCCs'] = ...
# params['minDistCC'] = ...
# params['pageRatio'] = ...
# params['alignBaseClasses'] = ...
# params['alignSiblings'] = ...
# params['Ranking'] = ...
# params['Two-layer crossing minimization'] = ...
# params['Layout'] = ...
# params['transpose vertically'] = ...
# params['Number of crossings'] = ...
# params['Number of levels/layers'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Sugiyama (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Sugiyama (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Tile To Rows Packing (OGDF)¶
Description¶
The tile-to-rows algorithm for packing drawings of connected components.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tile To Rows Packing (OGDF)', graph)
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tile To Rows Packing (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tile To Rows Packing (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Tree Leaf¶
Description¶
Implements a simple level-based tree layout.
All leaves are placed at a distance one (x-coordinates) and the order is the one of a suffix ordering. The y coordinates is the depth in the tree. The other nodes are placed at the center of their children (x-coordinates), and the y-coordinate is their depth in the tree.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
orientation |
up to down |
input |
Choose a desired orientation. |
|
uniform layer spacing |
|
|
input |
If the layer spacing is uniform, the spacing between two consecutive layers will be the same. |
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tree Leaf', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['orientation'] = ...
# params['uniform layer spacing'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tree Leaf', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tree Leaf', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Tree Radial¶
Description¶
Implements the radial tree layout algorithm first published as:
MoireGraphs: Radial Focus+Context Visualization and Interaction for Graphs with Visual Nodes T. J. Jankun-Kelly, Kwan-Liu Ma. Proc. IEEE Symposium on Information Visualization, INFOVIS pages 59–66 (2003).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
node size |
viewSize |
input |
This parameter defines the property used for node sizes. |
|
layer spacing |
|
input |
This parameter enables to set up the minimum space between two layers in the drawing. |
|
node spacing |
|
input |
This parameter enables to set up the minimum space between two nodes in the same layer. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Tree Radial', graph)
# set any input parameter value if needed
# params['node size'] = ...
# params['layer spacing'] = ...
# params['node spacing'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Tree Radial', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Tree Radial', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Upward Planarization (OGDF)¶
Description¶
Implements an alternative to the classical Sugiyama approach. It adapts the planarization approach for hierarchical graphs and produces significantly less crossings than Sugiyama layout.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
transpose |
|
|
input |
If true, transpose the layout vertically. |
number of crossings |
|
output |
Returns the number of crossings |
|
number of layers |
|
output |
Returns the number of layers/levels |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Upward Planarization (OGDF)', graph)
# set any input parameter value if needed
# params['transpose'] = ...
# params['number of crossings'] = ...
# params['number of layers'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Upward Planarization (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Upward Planarization (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Visibility (OGDF)¶
Description¶
Implements a simple upward drawing algorithm based on visibility representations (horizontal segments for nodes, vertical segments for edges).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
minimum grid distance |
|
1 |
input |
The minimum grid distance. |
transpose |
|
|
input |
If true, transpose the layout vertically. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Visibility (OGDF)', graph)
# set any input parameter value if needed
# params['minimum grid distance'] = ...
# params['transpose'] = ...
# either create or get a layout property from the graph to store the result of the algorithm
resultLayout = graph.getLayoutProperty('resultLayout')
success = graph.applyLayoutAlgorithm('Visibility (OGDF)', resultLayout, params)
# or store the result of the algorithm in the default Tulip layout property named 'viewLayout'
success = graph.applyLayoutAlgorithm('Visibility (OGDF)', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Measure¶
To call these plugins, you must use the tlp.Graph.applyDoubleAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
Betweenness Centrality¶
Description¶
Computes the betweeness centrality as described for:
- nodes in A Faster Algorithm for Betweenness Centrality , U. Brandes, Journal of Mathematical Sociology volume 25, pages 163-177 (2001), doi: <a href=”https://doi.org/10.1080/0022250X.2001.9990249”>10.1080/0022250X.2001.9990249</a>
- edges in Finding and evaluating community structure in networks , M. E. J. Newman and M. Girvan, Physics Reviews E, volume 69 (2004), doi: <a href=”https://doi.org/10.1103/PhysRevE.69.026113”>10.1103/PhysRevE.69.026113</a>.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
directed |
|
|
input |
Indicates if the graph should be considered as directed or not. |
norm |
|
|
input |
If true the node measure will be normalized |
weight |
input |
An existing edge weight metric property. |
||
average path length |
|
output |
The computed average path length |
|
target |
both |
input |
Indicates whether the metric is computed only for nodes, edges, or both. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Betweenness Centrality', graph)
# set any input parameter value if needed
# params['directed'] = ...
# params['norm'] = ...
# params['weight'] = ...
# params['average path length'] = ...
# params['target'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Betweenness Centrality', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Betweenness Centrality', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Biconnected Component¶
Description¶
Implements a biconnected component decomposition.It assigns the same value to all the edges in the same component.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#biconnected components |
|
output |
Number of biconnected components found |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Biconnected Component', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Biconnected Component', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Biconnected Component', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Cluster¶
Description¶
Computes the Cluster metric as described in:
Software component capture using graph clustering , Y. Chiricota. F. Jourdan, an G. Melancon, Proceedings of the 11th IEEE International Workshop on Program Comprehension, 2003.doi: <a href=”https://doi.org/10.1109/WPC.2003.1199205”>10.1109/WPC.2003.1199205</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
depth |
|
1 |
input |
Maximal depth of a computed cluster. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Cluster', graph)
# set any input parameter value if needed
# params['depth'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Cluster', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Cluster', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Connected Component¶
Description¶
Implements a decomposition in connected components. This algorithm assigns to each node a value defined as following: if two nodes are in the same connected component they have the same value else they have a different value. Edges get the value of their source node.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#connected components |
|
output |
Number of components found |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Connected Component', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Connected Component', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Connected Component', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Convolution¶
Description¶
Discretization and filtering of the distribution of a node metric using a convolution following:
Strahler based graph clustering using convolution, D. Auber, M. Delest and Y. Chiricota, Proceedings of the Eighth International Conference on Information Visualisation, 2004. IV 2004, doi: <a href=”https://doi.org/10.1109/IV.2004.1320123”>10.1109/IV.2004.1320123</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
viewMetric |
input |
An existing node metric property. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Convolution', graph)
# set any input parameter value if needed
# params['metric'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Convolution', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Convolution', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Dag Level¶
Description¶
Implements a DAG layer decomposition.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Dag Level', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Dag Level', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Dag Level', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Degree¶
Description¶
Assigns its degree to each node.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
type |
InOut |
input |
Type of degree to compute (in/out/inout). |
|
metric |
input |
The weighted degree of a node is the sum of weights of all its in/out/inout edges. If no metric is specified, using a uniform metric value of 1 for all edges returns the usual degree for nodes (number of neighbors). |
||
norm |
|
|
input |
If true, the measure is normalized in the following way.
|
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Degree', graph)
# set any input parameter value if needed
# params['type'] = ...
# params['metric'] = ...
# params['norm'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Degree', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Degree', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Depth¶
Description¶
For each node n on an acyclic graph,it computes the maximum path length between n and the other node.
The graph must be acyclic .
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
edge weight |
input |
This parameter defines the metric used for edge weights. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Depth', graph)
# set any input parameter value if needed
# params['edge weight'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Depth', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Depth', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Eccentricity¶
Description¶
Computes the eccentricity/closeness centrality of each node.
Eccentricity is the maximum distance to go from a node to all others. In this version the Eccentricity value can be normalized (1 means that a node is one of the most eccentric in the network, 0 means that a node is on the centers of the network).
Closeness Centrality is the mean of shortest-paths lengths from a node to others. The normalized values are computed using the reciprocal of the sum of these distances.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
closeness centrality |
|
|
input |
If true, the closeness centrality is computed (i.e. the average distance from a node to all others). |
norm |
|
|
input |
If true, the returned values are normalized. For the closeness centrality, the reciprocal of the sum of distances is returned. The eccentricity values are divided by the graph diameter. Warning: The normalized eccentricity values should be computed on a (strongly) connected graph. |
directed |
|
|
input |
If true, the graph is considered directed. |
weight |
input |
An existing edge weight metric property. |
||
graph diameter |
|
-1 |
output |
The computed diameter (-1 if not computed) |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Eccentricity', graph)
# set any input parameter value if needed
# params['closeness centrality'] = ...
# params['norm'] = ...
# params['directed'] = ...
# params['weight'] = ...
# params['graph diameter'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Eccentricity', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Eccentricity', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Id¶
Description¶
Assigns their Tulip id to nodes and edges.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
target |
both |
input |
Whether the id is copied only for nodes, only for edges, or for both. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Id', graph)
# set any input parameter value if needed
# params['target'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Id', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Id', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
K-Cores¶
Description¶
Node partitioning measure based on the K-core decomposition of a graph.
K-cores were first introduced in:
Network structure and minimum degree , S. B. Seidman, Social Networks 5:269-287 (1983), doi: <a href=”https://doi.org/10.1016/0378-8733(83)90028-X”>10.1016/0378-8733(83)90028-X</a>.
This is a method for simplifying a graph topology which helps in analysis and visualization of social networks.
Note : use the default parameters to compute simple K-Cores (undirected and unweighted).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
type |
InOut |
input |
This parameter indicates the direction used to compute K-Cores values. |
|
metric |
input |
An existing edge metric property, used to specify the weights of edges. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('K-Cores', graph)
# set any input parameter value if needed
# params['type'] = ...
# params['metric'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('K-Cores', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('K-Cores', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Leaf¶
Description¶
Computes the number of leaves in the subtree induced by each node.
The graph must be acyclic .
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Leaf', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Leaf', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Leaf', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Link Communities¶
Description¶
Edges partitioning measure used for community detection.
It is an implementation of a fuzzy clustering procedure. First introduced in:
Link communities reveal multiscale complexity in networks , Ahn, Y.Y. and Bagrow, J.P. and Lehmann, S., Nature vol:466, 761–764 (2010)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
input |
An existing edge metric property. |
||
Group isthmus |
|
|
input |
This parameter indicates whether the single-link clusters should be merged or not. |
Number of steps |
|
200 |
input |
This parameter indicates the number of thresholds to be compared. |
Calling the 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('Link Communities', graph)
# set any input parameter value if needed
# params['metric'] = ...
# params['Group isthmus'] = ...
# params['Number of steps'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Link Communities', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Link Communities', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Louvain¶
Description¶
Nodes partitioning measure used for community detection.This is an implementation of the Louvain clustering algorithm first published in:
Fast unfolding of communities in large networks , Blondel, V.D. and Guillaume, J.L. and Lambiotte, R. and Lefebvre, E., Journal of Statistical Mechanics: Theory and Experiment, (2008), doi: <a href=”https://doi.org/10.1088/1742-5468/2008/10/P10008”>10.1088/1742-5468/2008/10/P10008</a>.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
input |
An existing edge weight metric property. If it is not defined all edges have a weight of 1.0. |
||
precision |
|
0.000001 |
input |
A given pass stops when the modularity is increased by less than precision. Default value is 0.000001 |
modularity |
|
output |
The computed modularity |
|
#communities |
|
output |
The number of communities found |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Louvain', graph)
# set any input parameter value if needed
# params['metric'] = ...
# params['precision'] = ...
# params['modularity'] = ...
# params['#communities'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Louvain', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Louvain', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
MCL Clustering¶
Description¶
Nodes partitioning measure of Markov Cluster algorithm
used for community detection.This is an implementation of the MCL algorithm first published as:
Graph Clustering by Flow Simulation , Stijn van Dongen PhD Thesis, University of Utrecht (2000).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
inflate |
|
input |
Determines the random walk length at each step. |
|
weights |
input |
Edge weights to use. |
||
pruning |
|
5 |
input |
Determines, for each node, the number of strongest link kept at each iteration. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('MCL Clustering', graph)
# set any input parameter value if needed
# params['inflate'] = ...
# params['weights'] = ...
# params['pruning'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('MCL Clustering', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('MCL Clustering', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Node¶
Description¶
Computes the number of nodes in the subtree induced by each node.
The graph must be acyclic .
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Node', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Node', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Node', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Page Rank¶
Description¶
Nodes measure used for links analysis.
First designed by Larry Page and Sergey Brin, it is a link analysis algorithm that assigns a measure to each node of an ‘hyperlinked’ graph. It first appears in: The anatomy of a large-scale hypertextual Web search engine , Sergey Brin and Lawrence Page, Computer Networks and ISDN Systems Journal, vol. 30, number 1, pp 107-117 (1998), doi: <a href=”https://doi.org/10.1016/S0169-7552(98)00110-X”>10.1016/S0169-7552(98)00110-X</a>
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
d |
|
0.85 |
input |
Enables to choose a damping factor in ]0,1[. |
directed |
|
|
input |
Indicates if the graph should be considered as directed or not. |
weight |
input |
An existing edge weight metric property. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Page Rank', graph)
# set any input parameter value if needed
# params['d'] = ...
# params['directed'] = ...
# params['weight'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Page Rank', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Page Rank', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Path Length¶
Description¶
Assigns to each node the number of paths that goes through it.
The graph must be acyclic .
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Path Length', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Path Length', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Path Length', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Random metric¶
Description¶
Assigns random values to nodes and edges.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
target |
both |
input |
Whether metric is computed only for nodes, only for edges, or for both. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Random metric', graph)
# set any input parameter value if needed
# params['target'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Random metric', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Random metric', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Second Order Centrality¶
Description¶
An implementation of the Second Order centrality measure first published as:
Kermarrec, A.-M., et al. (2011). “Second order centrality: Distributed assessment of nodes criticity in complex networks.” Computer Communications 34(5): 619-628,
doi: <a href=”https://dx.doi.org/10.1016/j.comcom.2010.06.007”>https://dx.doi.org/10.1016/j.comcom.2010.06.007</a>.
This algorithm computes the standard deviation of the return time on each node of a random walker. Central nodes are those with the lower values.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Selection |
viewSelection |
input |
Boolean Property for choosing the starting node instead of choosing a node randomly if nothing is selected. |
|
Debug mode |
|
|
input |
Activate debug mode to get the vector of each time the walker pass through a node in a property called tickVector. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Second Order Centrality', graph)
# set any input parameter value if needed
# params['Selection'] = ...
# params['Debug mode'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Second Order Centrality', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Second Order Centrality', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Strahler¶
Description¶
Computes the Strahler numbers.This is an implementation of the Strahler numbers computation, first published as:
Hypsomic analysis of erosional topography , A.N. Strahler, Bulletin Geological Society of America 63,pages 1117-1142 (1952).
Extended to graphs in:
Using Strahler numbers for real time visual exploration of huge graphs , D. Auber, ICCVG, International Conference on Computer Vision and Graphics, pages 56-69 (2002)
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
All nodes |
|
|
input |
If true, for each node the Strahler number is computed from a spanning tree having that node as root: complexity o(n^2). If false the Strahler number is computed from a spanning tree having the heuristicly estimated graph center as root. |
Type |
all |
input |
Sets the type of computation. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strahler', graph)
# set any input parameter value if needed
# params['All nodes'] = ...
# params['Type'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strahler', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strahler', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Strength¶
Description¶
Computes the Strength metric as described in
Software component capture using graph clustering , Y. Chiricota. F.Jourdan, an G.Melancon, IWPC (2002).
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strength', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Strength Clustering¶
Description¶
Implements a single-linkage clustering. The similarity measure used here is the Strength Metric computed on edges. The best threshold is found using MQ Quality Measure. See:
Software component capture using graph clustering , Y. Chiricota, F.Jourdan, and G. Melancon, IWPC ‘03: Proceedings of the 11th IEEE International Workshop on Program Comprehension
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
metric |
input |
Metric used in order to multiply strength metric computed values.If one is given, the complexity is O(n log(n)), O(n) neither. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strength Clustering', graph)
# set any input parameter value if needed
# params['metric'] = ...
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strength Clustering', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strength Clustering', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Strongly Connected Component¶
Description¶
Implements a strongly connected components decomposition.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#strongly connected components |
|
output |
Number of strongly components found |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Strongly Connected Component', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Strongly Connected Component', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Strongly Connected Component', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Welsh & Powell¶
Description¶
Nodes coloring measure,
values assigned to adjacent nodes are always different.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Welsh & Powell', graph)
# either create or get a double property from the graph to store the result of the algorithm
resultMetric = graph.getDoubleProperty('resultMetric')
success = graph.applyDoubleAlgorithm('Welsh & Powell', resultMetric, params)
# or store the result of the algorithm in the default Tulip metric property named 'viewMetric'
success = graph.applyDoubleAlgorithm('Welsh & Powell', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Resizing¶
To call these plugins, you must use the tlp.Graph.applySizeAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
Auto Sizing¶
Description¶
Resize the nodes and edges of a graph so that the graph gets easy to read. The size of a node will depend on the number of its sons.
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Auto Sizing', graph)
# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Auto Sizing', resultSize, params)
# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Auto Sizing', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Size Mapping¶
Description¶
Maps the size of the graph elements onto the values of a given numeric property.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
property |
viewMetric |
input |
Input metric whose values will be mapped to sizes. |
|
input |
viewSize |
input |
If not all dimensions (width, height, depth) are checked below, the dimensions not computed are copied from this property. |
|
width |
|
|
input |
Adjusts width (along x axis) to represent the chosen property. If not chosen, the dimension is copied from input. |
height |
|
|
input |
Adjusts height (along y axis) to represent the chosen property. If not chosen, the dimension is copied from input. |
depth |
|
|
input |
Adjusts depth (along z axis) to represent the chosen property. If not chosen, the dimension is copied from input. |
min size |
|
1 |
input |
Gives the minimum value of the range of computed sizes. |
max size |
|
10 |
input |
Gives the maximum value of the range of computed sizes. |
type |
linear |
input |
Type of mapping.
|
|
target |
nodes |
input |
Whether sizes are computed for nodes or for edges. |
|
area proportional |
Area Proportional |
input |
The mapping can either be area/volume proportional, or square/cubic;i.e. the areas/volumes will be proportional, or the dimensions (width, height and depth) will be. |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Size Mapping', graph)
# set any input parameter value if needed
# params['property'] = ...
# params['input'] = ...
# params['width'] = ...
# params['height'] = ...
# params['depth'] = ...
# params['min size'] = ...
# params['max size'] = ...
# params['type'] = ...
# params['target'] = ...
# params['area proportional'] = ...
# either create or get a size property from the graph to store the result of the algorithm
resultSize = graph.getSizeProperty('resultSize')
success = graph.applySizeAlgorithm('Size Mapping', resultSize, params)
# or store the result of the algorithm in the default Tulip size property named 'viewSize'
success = graph.applySizeAlgorithm('Size Mapping', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Selection¶
To call these plugins, you must use the tlp.Graph.applyBooleanAlgorithm()
method. See also Calling a property algorithm on a graph for more details.
Induced SubGraph¶
Description¶
Selects all the nodes/edges of the subgraph induced by a set of selected nodes.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
Nodes |
viewSelection |
input |
Set of nodes from which the induced subgraph is computed. |
|
Use edges |
|
|
input |
If true, source and target nodes of selected edges will also be added in the input set of nodes. |
#edges selected |
|
output |
The number of newly selected edges |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Induced SubGraph', graph)
# set any input parameter value if needed
# params['Nodes'] = ...
# params['Use edges'] = ...
# params['#edges selected'] = ...
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Induced SubGraph', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Induced SubGraph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Kruskal¶
Description¶
Implements the classical Kruskal algorithm to select a minimum spanning tree in a connected graph.Only works on undirected graphs, (ie. the orientation of edges is omitted).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
edge weight |
viewMetric |
input |
Metric containing the edge weights. |
|
#edges selected |
|
output |
The number of newly selected edges |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Kruskal', graph)
# set any input parameter value if needed
# params['edge weight'] = ...
# params['#edges selected'] = ...
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Kruskal', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Kruskal', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Loop Selection¶
Description¶
Selects loops in a graph.
A loop is an edge that has the same source and target.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#edges selected |
|
output |
The number of loops selected |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Loop Selection', graph)
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Loop Selection', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Loop Selection', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Make Selection a Graph¶
Description¶
Extends the selection to have a graph.
All selected edges of the current graph will have their extremities selected (no dangling edges).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
selection |
viewSelection |
input |
The property indicating the selected elements |
|
#elements selected |
|
output |
The number of graph elements (nodes + edges) selected |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Make Selection a Graph', graph)
# set any input parameter value if needed
# params['selection'] = ...
# params['#elements selected'] = ...
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Make Selection a Graph', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Make Selection a Graph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Multiple Edges Selection¶
Description¶
Selects the multiple or parallel edges of a graph.
Two edges are considered as parallel if they have the same source/origin and the same target/destination.If it exists n edges between two nodes, only n-1 edges will be selected.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
directed |
|
|
input |
Indicates if the graph should be considered as directed or not. |
#edges selected |
|
output |
The number of multiple edges selected |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Multiple Edges Selection', graph)
# set any input parameter value if needed
# params['directed'] = ...
# params['#edges selected'] = ...
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Multiple Edges Selection', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Reachable SubGraph¶
Description¶
Selects all nodes and edges at a given distance of a set of selected nodes.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
edge direction |
output edges |
input |
This parameter defines the navigation direction. |
|
starting nodes |
viewSelection |
input |
This parameter defines the starting set of nodes used to walk in the graph. |
|
distance |
|
5 |
input |
This parameter defines the maximal distance of reachable nodes. |
#edges selected |
|
output |
The number of newly selected edges |
|
#nodes selected |
|
output |
The number of newly selected nodes |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Reachable SubGraph', graph)
# set any input parameter value if needed
# params['edge direction'] = ...
# params['starting nodes'] = ...
# params['distance'] = ...
# params['#edges selected'] = ...
# params['#nodes selected'] = ...
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Reachable SubGraph', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Reachable SubGraph', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Spanning Dag¶
Description¶
Selects an acyclic subgraph of a graph.
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#edges selected |
|
output |
The number of ‘dag’ selected edges |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Spanning Dag', graph)
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Dag', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Spanning Dag', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary
Spanning Forest¶
Description¶
Selects a subgraph of a graph that is a forest (a set of trees).
Parameters¶
name |
type |
default |
direction |
description |
---|---|---|---|---|
#edges selected |
|
output |
The number of ‘tree’ selected edges |
Calling the plugin from Python¶
To call that plugin from Python, use the following code snippet:
# get a dictionary filled with the default plugin parameters values
# graph is an instance of the tlp.Graph class
params = tlp.getDefaultPluginParameters('Spanning Forest', graph)
# either create or get a boolean property from the graph to store the result of the algorithm
resultSelection = graph.getBooleanProperty('resultSelection')
success = graph.applyBooleanAlgorithm('Spanning Forest', resultSelection, params)
# or store the result of the algorithm in the default Tulip boolean property named 'viewSelection'
success = graph.applyBooleanAlgorithm('Spanning Forest', params)
# if the plugin declare any output parameter, its value can now be retrieved in the 'params' dictionary