Large graphs analysis and drawing
Project description
Module description
Graphs play an important role in many research areas, such as biology, microelectronics, social sciences, data mining, and computer science. Tulip (http://tulip.labri.fr) [1] is an Information Visualization framework dedicated to the analysis and visualization of such relational data. Written in C++ the framework enables the development of algorithms, visual encodings, interaction techniques, data models, and domain-specific visualizations.
The Tulip core library is available to the Python community through the Tulip-Python bindings [2]. The bindings have been developed using the SIP tool [3] from Riverbank Computed Limited, allowing to easily create quality Python bindings for any C/C++ library. The main features provided by the bindings are the following ones:
Creation and manipulation of graphs : Tulip provides an efficient graph data structure for storing large and complex networks. It is also one of the few that offer the possibility to efficiently define and navigate graph hierarchies or cluster trees (nested sub-graphs).
Storage of data on graph elements : Tulip allows to associate different kind of serializable data (boolean, integer, float, string, …) and visual attributes (layout, color, size, …) to graph elements. All these data can be easily accessed from the Tulip graph data structure facilitating the development of algorithms.
Application of algorithms of different types on graph : Tulip has been designed to be easily extensible and provides a variety of graph algorithms (layout, metric, clustering, …) implemented as C++ plugins. All these algorithms can be called from Python. As Tulip is dedicated to graph visualization, it is provided with numerous state of the art graph layout algorithms but also a bridge to the Open Graph Drawing Framework (http://www.ogdf.net) [4]
Release notes
Some informations regarding the Tulip-Python releases pushed on the Python Packaging Index:
4.8.0.post1 :
Fix crash on MacOS when calling OGDF layout algorithms
minor fixes
4.8.0 : Initial release based on Tulip 4.8
Example
The following script imports the dependency graph from the locally installed pip packages, draws it using a force directed layout algorithm and serializes the resulting graph to a file through the TLP graph format. The imported graph can then be visualized through the Tulip software or the use of the dedicated tulipgui module, enabling to create the OpenGL visualizations available in Tulip from Python.
import pip
import re
from tulip import *
# create a new empty graph
graph = tlp.newGraph()
# dictionnary mapping package name to graph node
packageNode = {}
# iterate over locally installed pip packages
for d in pip.get_installed_distributions():
# add a node associated to the package
n = graph.addNode()
packageNode[d.key] = n
# set node label for use with Tulip visualizations components
graph['viewLabel'][n] = d.key
# iterate over locally installed pip packages
for d in pip.get_installed_distributions():
# iterate over package requirements
for r in d.requires():
# process requirement name to get its pip package name :
# switch to lower case and remove version infos if any
s = str(r).lower()
match = re.search('|'.join(map(re.escape, '<=>')), s)
if match:
s = s[:match.start()]
# add an edge between the pip package and its dependency in the graph
graph.addEdge(packageNode[d.key], packageNode[s])
# apply a force directed layout algorithm on the graph then a connected component packing algorithm.
# algorithms are called with their default parameters.
# resulting layout will be stored in the defaut graph layout property named 'viewLayout'
graph.applyLayoutAlgorithm('Fast Multipole Multilevel Embedder (OGDF)')
graph.applyLayoutAlgorithm('Connected Component Packing (Polyomino)')
# serializes the graph to a file using the TLP graph format,
# that file can then be opened with the Tulip software for visualization purposes.
tlp.saveGraph(graph, 'pip_deps.tlp')
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file tulip_python-4.8.0.post1-cp35-none-win_amd64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp35-none-win_amd64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.5, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f68c4c76b32542a5b0bf1a6dcbcbe7daee651d65296b023b97209347d515c33d |
|
MD5 | bdc8c5a77c597a30d6c983f8870133c8 |
|
BLAKE2b-256 | 34086a78edc91cdf90ee9d5ec8b0aaf0248df619d0b9154227cca5b87b40bd8c |
File details
Details for the file tulip_python-4.8.0.post1-cp35-none-win32.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp35-none-win32.whl
- Upload date:
- Size: 12.0 MB
- Tags: CPython 3.5, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b4f67afa267e3bdcb9454d2dd3f8f9dd1b58f940d5cb28d4bf27ff39a3456a |
|
MD5 | 2a8f9e0c48ae730fe8296f12f7badac7 |
|
BLAKE2b-256 | 548ec278a6479650c039c228daffd684c0595c8fc811afd547746cc92ea10531 |
File details
Details for the file tulip_python-4.8.0.post1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
- Upload date:
- Size: 15.5 MB
- Tags: CPython 3.5m, macOS 10.10+ Intel (x86-64, i386), macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541d63e148063da26e07bad28dd7364023739382a14f0c815e6307741bf8c439 |
|
MD5 | 32de623168b345f9149c4620308d96ba |
|
BLAKE2b-256 | aeae0a6a4b4b5b1ed4cd06f1062998d7d9c5286ee533db88b518b0656fee8312 |
File details
Details for the file tulip_python-4.8.0.post1-cp34-none-win_amd64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp34-none-win_amd64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.4, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aae9507af9f6df8adbda2199dd376d523581a514c52a191e4e272a8c41e8b70 |
|
MD5 | b857a63cba3c230d5e49d663c5122145 |
|
BLAKE2b-256 | 4a587bc5f1987d4671eaaf28e0328ec559be55b07722ef044dc4419ac9ad1af9 |
File details
Details for the file tulip_python-4.8.0.post1-cp34-none-win32.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp34-none-win32.whl
- Upload date:
- Size: 12.0 MB
- Tags: CPython 3.4, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6743c9fd1a1510f35467f76e042f2513143bbc4d0e341fc0d5d575a1121d01c |
|
MD5 | 95c17c5147e03f87498c5b9d0ea3e48a |
|
BLAKE2b-256 | fdea01addd401cc0ce48c4a574f9d9c6089e39144ab0ea33cde992ca0c69a659 |
File details
Details for the file tulip_python-4.8.0.post1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
- Upload date:
- Size: 15.5 MB
- Tags: CPython 3.4m, macOS 10.10+ Intel (x86-64, i386), macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8871005a981cf5bb5cf63dad21b4c7d1b5c2d0c79c56b0dd4f616bbd401d5a |
|
MD5 | a57f94a50a8faf6eaaab9723d37fd6d6 |
|
BLAKE2b-256 | e91437a7205e0e03f4119437c5a467aedfc8b9ca3af4d5b702cc1b404920e7c7 |
File details
Details for the file tulip_python-4.8.0.post1-cp33-none-win_amd64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp33-none-win_amd64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.3, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fda6bde1ab8cfaa06c1dfe71baf02214d6441bcb96159fa1a0b42b09b2144c6a |
|
MD5 | 11b56db0ea29d3c6a6d402e35b711d0f |
|
BLAKE2b-256 | 78923a68f166963f90609abcb5bd0568b72a7f1a2eb223993b1e4085ba27fab1 |
File details
Details for the file tulip_python-4.8.0.post1-cp33-none-win32.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp33-none-win32.whl
- Upload date:
- Size: 12.0 MB
- Tags: CPython 3.3, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e20f8ab54a548f2e6d4821dadb268a7b1c61ddfea53683fe57d7564b44e053 |
|
MD5 | 3fed4e19c9517c5eaf5d34858232b0e8 |
|
BLAKE2b-256 | a5f98ce9fc66956cedbbe4e35a6cf460adac946bb9eb85496801d7dc17a6cc9e |
File details
Details for the file tulip_python-4.8.0.post1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
- Upload date:
- Size: 15.5 MB
- Tags: CPython 3.3m, macOS 10.10+ Intel (x86-64, i386), macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45efd91f5c06b929c89b7d606167793c019dea9fd4efa9468dce11c36e0ed42d |
|
MD5 | 159d50eabccf7b545b9a055255e9f50e |
|
BLAKE2b-256 | 312a2d893c604ea0d0f3dcd30a2e1e6ae61524bfa3676f01cba66b0351de31cb |
File details
Details for the file tulip_python-4.8.0.post1-cp27-none-win_amd64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp27-none-win_amd64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 2.7, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4def090b263c7217463694b3f403b7cc50a63b914a35a3bca4ee0575b7938f4d |
|
MD5 | cb20e13f6d1bae7215d04584d35d4538 |
|
BLAKE2b-256 | 5e1df460c58b8a6be5831e58d2a51571c01a6c07819e478dc8266fa5af3ba8c3 |
File details
Details for the file tulip_python-4.8.0.post1-cp27-none-win32.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp27-none-win32.whl
- Upload date:
- Size: 12.0 MB
- Tags: CPython 2.7, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d2d7081181976febcb72b34712a61449c69179899a89f1ec7c90c69bc12c84e |
|
MD5 | d44f64bf28bf9f1f669f63bd417076c2 |
|
BLAKE2b-256 | c50cbde4d0cd0526fbe4f50f71b332e2fdf32c618a66168c599fd28c038b644f |
File details
Details for the file tulip_python-4.8.0.post1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
.
File metadata
- Download URL: tulip_python-4.8.0.post1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
- Upload date:
- Size: 15.5 MB
- Tags: CPython 2.7, macOS 10.10+ Intel (x86-64, i386), macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83eafd09abb835ef23cbaff43c85f05e4bbb03d04a9cddc1abf29130c75595a3 |
|
MD5 | 67cd2792980ed5237b262414ac0aa820 |
|
BLAKE2b-256 | 3301881940ecacf2f5f01549bd6ea13b2e7989a05f775ba63990e9cc71056907 |