Skip to main content

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] [2] 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 [3]. The bindings have been developed using the SIP tool [4] 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 subgraphs).

  • 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) [5]

Release notes

Some information regarding the Tulip-Python releases pushed on the Python Packaging Index:

  • 5.1.0: based on Tulip 5.1.0 released on 07/11/2017

    • bugs fixes release with focus on API testing and stabilization

    • some slight API improvements (see updated documentation)

  • 5.0.0: based on Tulip 5.0.0 released on 27/06/2017

    • mainly a bugs and memory leaks fix release for the Python bindings that now benefit from the performance improvements recently integrated in the tulip-core C++ library

    • some new methods added in the API and some deprecated (see updated documentation)

    • new Tulip plugins have been added, notably import ones like BibTex, GraphML, npm, … (see updated plugins list in the documentation)

  • 4.10.0: based on Tulip 4.10.0 released on 08/12/2016

    • some new methods added and API improvements (see updated documentation)

    • add a new section in the documentation detailing the C++ plugins bundled with Tulip that can be called from Python

    • improvements for working with Tulip color scales (see updated documentation)

  • 4.9.0 : based on Tulip 4.9.0 released on 08/07/2016

    • add a mechanism to ease the creation of graph properties through type inference (see updated documentation)

    • simplify the declaration of file parameters for Tulip Python plugins (see updated documentation)

    • a few bugs fixes

  • 4.8.1 : based on Tulip 4.8.1 released on 16/02/2016

    • add new convenient methods for getting / setting multiple properties values of nodes and edges, trough the use of a dictionnary, in the tlp.Graph class (see updated documentation)

    • some bugs fixes

  • 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 tlp

# create a new empty graph
graph = tlp.newGraph()

# dictionnary mapping package name to graph node
packageNode = {}

def addPackageNode(package):
  if not package in packageNode:
    n = graph.addNode()
    packageNode[package] = n
    # set node label for use with Tulip visualizations components
    graph['viewLabel'][n] = package

# iterate over locally installed pip packages
for d in pip.get_installed_distributions():
  # add a node associated to the package
  addPackageNode(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 info if any
    s = str(r).lower()
    match = re.search('|'.join(map(re.escape, '<=>;!')), s)
    if match:
      s = s[:match.start()]
    # add dependency package node if it does not exist yet
    addPackageNode(s)
    # 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)')

tlp.saveGraph(graph, 'pip_deps.tlp')

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tulip_python-5.2.1-cp37-cp37m-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.7m Windows x86-64

tulip_python-5.2.1-cp37-cp37m-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.7m

tulip_python-5.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tulip_python-5.2.1-cp36-cp36m-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.6m Windows x86-64

tulip_python-5.2.1-cp36-cp36m-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.6m

tulip_python-5.2.1-cp36-cp36m-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

tulip_python-5.2.1-cp35-cp35m-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.5m Windows x86-64

tulip_python-5.2.1-cp35-cp35m-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.5m

tulip_python-5.2.1-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 (9.5 MB view details)

Uploaded 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

tulip_python-5.2.1-cp34-cp34m-win_amd64.whl (23.9 MB view details)

Uploaded CPython 3.4m Windows x86-64

tulip_python-5.2.1-cp34-cp34m-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.4m

tulip_python-5.2.1-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 (9.5 MB view details)

Uploaded 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

tulip_python-5.2.1-cp27-cp27mu-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 2.7mu

tulip_python-5.2.1-cp27-cp27m-win_amd64.whl (23.9 MB view details)

Uploaded CPython 2.7m Windows x86-64

tulip_python-5.2.1-cp27-cp27m-manylinux1_x86_64.whl (10.9 MB view details)

Uploaded CPython 2.7m

tulip_python-5.2.1-cp27-cp27m-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 2.7m macOS 10.9+ x86-64

File details

Details for the file tulip_python-5.2.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for tulip_python-5.2.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c2878762c6ee6a26270de6b048854ba50f07e55f7b593dc43c0d682633cb2565
MD5 d0d6e122c90b28731ccb243e331ad72b
BLAKE2b-256 1e64714e522d00d10498200c1324d4b0c8318f47aff17d60ed3ebf78acbee6b2

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7428970c28e67d0c0ee4ad18191652d4c4774f361dfff7333d0589d3fa61bcd3
MD5 3433d19861308c9b435511325ccf9e21
BLAKE2b-256 bc5d5bceb09b25344a51338ed4d87120a933be7b8cfa2b33fd91768647296475

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for tulip_python-5.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1929ab17baf4c2e50394250b7467404eaf53a23c44d08533b157ab8d6182a73
MD5 67532d6275b5a726cb4874dc621dd997
BLAKE2b-256 14f367d91fa4413d0ad2ff58c9ad6506c8129c76027c74e4bd65a3f1541f319a

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for tulip_python-5.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 87e9e45a3f5947df578d3748bfa8f2d1acc9d89af1684b0ff46b41dd1bce0383
MD5 40ea1c18204dc083ffd4d6f3512e4f07
BLAKE2b-256 08f5c94acd74bdbb7c1d45a907f38824718e3b6dd144ebaa095d48e0ea18e593

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 02b180bdc267101de7563ce2ed2e01bb1319fd392cb38cbc7c4bc30df6fb47d2
MD5 f49d649b24365774199df6baed571727
BLAKE2b-256 6f3fad33a7aa31c5929315d3c9cbc9c0c8c823d73c462b4a7611f14c42e62c18

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for tulip_python-5.2.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa20cbdd220edc4cddb626bb5aba29e693cbd34705747abad70165a54f1f7ab5
MD5 7f65b562a6a58e2320f6f7cafa1b7668
BLAKE2b-256 31651a1b4597bbc5a34cf02e608c9dd50d3405defce3bbfa98eaca35ed0c5952

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for tulip_python-5.2.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e755a9fdddc4a8feda970bb4598603d29962d7f8010574c64426bff33a95144e
MD5 47c22ba107ece76c4c4ca532811c1ade
BLAKE2b-256 fd40f7a86532d589c8662b203d5c66a6f9ca145d9587e7755c6ecca8b1753177

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 83c98843151ddb0bb13d2e7e226e76f6dc30ec0b40283ace1e9b780576450e38
MD5 f360b40d6da2f5cd05929c4016cdc9ba
BLAKE2b-256 2a2c17cefe59f315416d118a9d30074c8e4213a77c29d96af3f2577382f448e1

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-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

File hashes

Hashes for tulip_python-5.2.1-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
Algorithm Hash digest
SHA256 763e77ef160d281155fbf487afa9152250d13088e78d09434d47c8aaadaa0ecc
MD5 e6ca08b0e4571e1eee2c51dd7cf71d37
BLAKE2b-256 d400f4dd095b4b850dd7a9cf81b06336e601e1b3a2f585bd3f0a0c282a3d1e4e

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp34-cp34m-win_amd64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp34-cp34m-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 3.4m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for tulip_python-5.2.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 fc3f82adf757cabf6e1f05eb49e90c13767a08ac2f21d84d7d1d2c29ff5307e5
MD5 90a6db99d2681727abc82caa725d96fe
BLAKE2b-256 38d8b97700f614b747a96ef459de704d356e29f80fb0b2eae516da9dde29c105

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b2ecc5173f26b8651e79feabee52f02f4a0bedde24f5e7cd6e426e295a1727ce
MD5 937d312b9906c7f6a498087c9c48c428
BLAKE2b-256 c25ee2b436b50c8b98a6de9e3054232e1adc492daf7efd4263cce98c0bf9bca4

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-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

File hashes

Hashes for tulip_python-5.2.1-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
Algorithm Hash digest
SHA256 7d0182f039e378773508f049f5cf640a9f715a4d0b85cdeeefd2c705de797c50
MD5 c7d53f66d7202805b075913003e7076f
BLAKE2b-256 e171f24ff7fcc0200808c3d5a9380cf8cbcc347859e4c1a7c21f7605460a12d9

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c4570c9035d1baa408104a2ab61c9e4c0af529957cb9ad0bad59b870c03fc0d5
MD5 b3eb7beabb34db0a8b2ccbf3766dea9e
BLAKE2b-256 72aba2d278e4c82a9e7ce3d71ffe223d9bc91bbfae29e91e9b1ade10bdc6d315

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 23.9 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for tulip_python-5.2.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 4ffa1b7a1acb2d1608caefd54ecf48810fa686dd7cfebb5d13b97b51f54bed0c
MD5 eb1f19b90501d0036044cf9fd9e2b8b4
BLAKE2b-256 b7fbfef67ad84d994ef752d800a9d5ab54c4bd3451b92590108e88dfa55eb998

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15rc1

File hashes

Hashes for tulip_python-5.2.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4460075ad8180a377fddd1ff0f6210c87a96c6378679153d25311dd19abb5f93
MD5 c5d8ab78b82a56819ed950896f11dbe9
BLAKE2b-256 fe7426f6038c3584c7e056501466bbf691e16dfe9229ce0ee40dd4b94622c590

See more details on using hashes here.

File details

Details for the file tulip_python-5.2.1-cp27-cp27m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: tulip_python-5.2.1-cp27-cp27m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 2.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for tulip_python-5.2.1-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7dec393d3e4183982685e630b23725745e61802df55fe44e2df43c66a9105b56
MD5 9f4f3a3a57178ffa582fdd126cd19654
BLAKE2b-256 6ae9466c26ea734c6f8fc4b4b5a5bff712e9f7184725e0a9b0d7f29773634ad2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page