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] 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.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 *

# 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


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-4.8.1-cp35-cp35m-win_amd64.whl (15.3 MB view details)

Uploaded CPython 3.5m Windows x86-64

tulip_python-4.8.1-cp35-cp35m-win32.whl (14.3 MB view details)

Uploaded CPython 3.5m Windows x86

tulip_python-4.8.1-cp35-cp35m-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.5m

tulip_python-4.8.1-cp35-cp35m-manylinux1_i686.whl (9.6 MB view details)

Uploaded CPython 3.5m

tulip_python-4.8.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 (15.3 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-4.8.1-cp34-cp34m-win_amd64.whl (15.3 MB view details)

Uploaded CPython 3.4m Windows x86-64

tulip_python-4.8.1-cp34-cp34m-win32.whl (14.3 MB view details)

Uploaded CPython 3.4m Windows x86

tulip_python-4.8.1-cp34-cp34m-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.4m

tulip_python-4.8.1-cp34-cp34m-manylinux1_i686.whl (9.6 MB view details)

Uploaded CPython 3.4m

tulip_python-4.8.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 (15.3 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-4.8.1-cp33-cp33m-win_amd64.whl (15.3 MB view details)

Uploaded CPython 3.3m Windows x86-64

tulip_python-4.8.1-cp33-cp33m-win32.whl (14.3 MB view details)

Uploaded CPython 3.3m Windows x86

tulip_python-4.8.1-cp33-cp33m-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.3m

tulip_python-4.8.1-cp33-cp33m-manylinux1_i686.whl (9.6 MB view details)

Uploaded CPython 3.3m

tulip_python-4.8.1-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 (15.3 MB view details)

Uploaded 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

tulip_python-4.8.1-cp27-cp27mu-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 2.7mu

tulip_python-4.8.1-cp27-cp27mu-manylinux1_i686.whl (9.6 MB view details)

Uploaded CPython 2.7mu

tulip_python-4.8.1-cp27-cp27m-win_amd64.whl (15.3 MB view details)

Uploaded CPython 2.7m Windows x86-64

tulip_python-4.8.1-cp27-cp27m-win32.whl (14.3 MB view details)

Uploaded CPython 2.7m Windows x86

tulip_python-4.8.1-cp27-cp27m-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 2.7m

tulip_python-4.8.1-cp27-cp27m-manylinux1_i686.whl (9.6 MB view details)

Uploaded CPython 2.7m

tulip_python-4.8.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (15.3 MB view details)

Uploaded CPython 2.7m 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

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 b586cf253c9f9e2a28ea57b7296bccc108582930d7d0a61fa57c1ace1647f722
MD5 85cdc53aa119d8455d976197214635e1
BLAKE2b-256 79c09510605c4e9ce56ba17edc3a5cc242185dfb0c6c3f810ad9ad42036fd335

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 58b165eb4d18446cf9216a6dba81fe20661905a67628726a8d7d102c3e3212c4
MD5 c19d45b1d0f43a689cfe8050fd70b1d3
BLAKE2b-256 7dfc093d0c2da4b04e5debb041da19cfd38defa777a2545df286865e661fd4a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cde27051843f2a882489bdb1a05888f56be922472d71e22d61f14e0008ba9a93
MD5 fe774a25dc4a415227e5d62d48eaab81
BLAKE2b-256 74d5575a905b95709cfd2f4f95c15f41251fc3ddd09984bba293c0f4eac42cdc

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 87641d6e96be7f62367c99cea3b1c8b5c391b3fca96bf6274ee998b20d82ef86
MD5 fa09acabad27bd36d025c32235b6262a
BLAKE2b-256 9ca1bbd87cc0c88f7b1f099fd5edff58af3a58b95b4c3b89a999d8a4f85a0b9e

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.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-4.8.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 e77e8c7749e081e0ff560e468fb3859585ab3af94573c7c94c87fd7c6d2000e8
MD5 1ab9de1fc59f56856a9e68979b658036
BLAKE2b-256 eb1d2d6128e68cae88906772f40468449e2cc0293f80f4102045ec573aeb30e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 fd926ea67c497d42939eb12941159aef907f148f23a529d24d5feb21cbeb554b
MD5 d856e8d1d23f0d22ee3a19d6934ca330
BLAKE2b-256 4b50d6fb4af18e5f6dd74968df8d33d9ac69917973796b57bd02fdcd17936bff

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 5e4e9728c7065e4d51bd1eed31e4f96dbf7dd268aebdbcb5a4e12d0c304c9686
MD5 78780d2a2bd6c5d7a8b723de26edd85c
BLAKE2b-256 81916eae7d4cd6794995a779780799c414f1949105c968a93d2f658a00b1db40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 14e7f963b493b44de8381e2b6ae45a8e107aca1e53adf8649edd1986ac6aeccb
MD5 b4822411ff6c85047fbc2ccf1e73451a
BLAKE2b-256 55f3ef53319185ecc92743801856e4461d8d5850658f4ff0c92cf7872a34e96f

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7eb83d08a0ee0de2c8275e15670dd068667b82c9361ecdeff8a93fa513ca0200
MD5 ece8111908cb04ea617c9ed8738ece1a
BLAKE2b-256 1c89011ee0c9fd7eec64994798969d5c8c3c515bced101319d8a2e253f1e9d9d

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.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-4.8.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 24af8e337b88472b67d27692d7f989eac7a5a5d42d385393355635b5e4bf6688
MD5 04a4f05ae4c791f4f86858239480cbe0
BLAKE2b-256 c13c1b0b6aeca609d0654562fc7037d69b4f21f504b5d29e9656e717230dfe36

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp33-cp33m-win_amd64.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 c9af6e11f7a227da5f1982b6624b4ca95e03f5805830f5ce815691ff82ff5a06
MD5 163f9f8958779c8f9b6ae0ddbb808a82
BLAKE2b-256 a2f327cd5119fdfeaa767a82703c2462b03fe38c69c53ed3bbcea05a0b907bc5

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp33-cp33m-win32.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 179e0076f93d1a4335e9d958d6e39ae67048c26be615e1e96a4d11925175de8b
MD5 e84f8952b29fd377bd8dd75fba928063
BLAKE2b-256 9643e8bf53fab47721f72b0feb414351fe6cc08562254010f4b27bf8a1c76b26

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp33-cp33m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 988f8b72ed2967b238e60d908ad3e49eeab65495d97be63fd21a5d863b92d330
MD5 394620876dd43c529f8b42a053816cbd
BLAKE2b-256 ab7228bb04d3ec93971457caa26edc4a54a0bd6cb3d18220fb82b41f9fb19428

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp33-cp33m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp33-cp33m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b710638ab55d7b6790a9ce240ea2ce61f8c11a8b981686a8f639682e10a64274
MD5 97c1b874b7a4f83f1bece94daa57475f
BLAKE2b-256 119da4e82b7cdb22fd248df5e7e10a652c8732af7850a5fb4c46f5d74fa0d51c

See more details on using hashes here.

File details

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

File hashes

Hashes for tulip_python-4.8.1-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
Algorithm Hash digest
SHA256 292581fb18971c383a11747cabce3fff90e5fbbcaa7a3c6e05e814b70cbfb4dd
MD5 44b381d4d5c4bc1c4e2d4a544e76092d
BLAKE2b-256 70be59b35596e087aabbd4b36c9040e0d6bb0e563a76c31478b8f775734bc7f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 696625c19b214a2c5ba53779e9801b0d9c989d7e488285ed8069a69faab6c6eb
MD5 4dfd2e77e9206202206425c154e19902
BLAKE2b-256 d7ce7c4520e284057298f801c8b9576ba1ebdb95f0ce21cb294450ae98290a8b

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp27-cp27mu-manylinux1_i686.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 af67c7bde8c433bdd3f876391bd5a30ae943b6e9f06d573c1232667ea522f7d7
MD5 9562ce98190fad97d0a15d2cd2537725
BLAKE2b-256 5d0ef934bab83195c67d91aa80e876f1e2653357067e6a072bf05eb7d004fd4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 a8855f6d71a2b0fd88933dbe4866c72e3db210cdc10196bf4f117fa4c84722b6
MD5 6cd27254cdc9ca27b5d2088ef5cc92a1
BLAKE2b-256 78cd1b6e326e710de1b3741fea1bbd5582b168ed6d636481fb22738b6d5d9034

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 d0d315235bccbca797261e3140911b96cd7ac7f25143b9042cba1b13f4391c17
MD5 84abb92a655d61553bb64d52545e8d69
BLAKE2b-256 3161919a1fdfe0cf73bb780c00bc9cc8badcd3ac19fd8141b0a9094ff1a16709

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0504a61c849ff15bcbfd1d7d1aae3d54aeec9aff012ab28f7ed9e7e1ab062a1d
MD5 88a736b50f60b22584b3da45fb246839
BLAKE2b-256 9f61f725f70dc322e2cca46afe53c01abc02fd786abaf8ea863dc34222dc27e4

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp27-cp27m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for tulip_python-4.8.1-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 62567f1eff27d7ee5a37c97e6668bd6751cce039785097c65d5cff5f2a51a334
MD5 5aa8df3c987a131d34ed0f6b14933d19
BLAKE2b-256 ca1478d566e5e5c75c8ffaeca7803c79a48cd845159b76e1e0074c505a0837f2

See more details on using hashes here.

File details

Details for the file tulip_python-4.8.1-cp27-cp27m-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-4.8.1-cp27-cp27m-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 6b2bffa11e2b1e7122c8cb9dcd638cbcd8abe7c7e72427c0c981d7e1b4313be9
MD5 27c25b2962f2b24f58280d7eded8eefa
BLAKE2b-256 d07e60dcd4713de907de9261eea11b595ad9a0aae59474b5e29b30e48b03901e

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