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

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.5m

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m

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

Uploaded CPython 3.4m

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

Uploaded CPython 3.3m Windows x86-64

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

Uploaded CPython 3.3m Windows x86

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

Uploaded CPython 3.3m

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

Uploaded CPython 3.3m

tulip_python-4.9.0-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.4 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.9.0-cp27-cp27mu-manylinux1_x86_64.whl (9.8 MB view details)

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

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

Uploaded CPython 2.7m

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

Uploaded CPython 2.7m

tulip_python-4.9.0-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.4 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.9.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 ea0a82a56f3f2ed63ba4c47f518e4912abaf4e578af6713a1446b2797141f55f
MD5 2e690d29df5680de333da4d345aeb6d3
BLAKE2b-256 d6fd6dad6bc9692186b8f1fa0f74d873d65deb3262b0f480ab28e997e47e977e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 234891030d5c14569188efca746af6f9b7bbaec640f8a759f8ca6ee5373621d8
MD5 1fa15d3a7a1ffe634f63ff71fdf9b31d
BLAKE2b-256 91a18c8f6735e7cff222e4ecd52ea53a877fcb8075569c77793f24d1d8c8fd7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 943ffdaf295bd4e4dd2261b8f29cd7ef415fe118370688f5346ff3713464709c
MD5 58bd7872ef5a6be6f54bc737fdcc0057
BLAKE2b-256 594698ae0f81b2d8b5c38101ab458eeff0a790664905f5b3c1b080dfb2059339

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 cf3b9ae9cad19f18c8f7981c4e038b1dccf85e3c103c043e21c2861df83c4e61
MD5 d41dc1201baf3759ed3d6e2c2394aed1
BLAKE2b-256 448cd43f33465f98ab1edd49bf1742bcc05759eeeb6bb674f61a0a43476ed92f

See more details on using hashes here.

File details

Details for the file tulip_python-4.9.0-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.9.0-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 6afa5c08b419bae99a096df7490977240946aabbf5b8b32e7ac5b2efb79328c7
MD5 618f9069bdff7bb2a3898b5ea29e99a1
BLAKE2b-256 9996b8f035080fb973876bf6c92325b79a0b974d3397727354524d2c33d49363

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 12bdad017195d0515a9cad01ede41f5cd150c6e21384ec23bf114cb67a98b84f
MD5 a45c1c7b4ec6e61584d74eb57697dd7f
BLAKE2b-256 733de75904105d97aba99f2acb7c8b8a848825b7ee07902e1c14010c2a255997

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 d6503b03332103fba2f0252f42e84f0f6c0259def58795e4891c93bd42e97094
MD5 1d315a8ea1c768d51f0919f7c000e217
BLAKE2b-256 ce1c4a93fe7c0565df1a7fc9af11d4a423c297e37c39999e7843a96539748fe8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b241ad07626758aeb98c5073094f4d92d65d52f34612afed28686a63fffac031
MD5 474de530deb89dc768932bb4a8c5d797
BLAKE2b-256 f9b14c99c6c6e8c32c8f210450cdfb8e4a82e8e0687150d35a5afdf794deaa65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 694e21c7785df7a699ba7eab7f4ff0113877e0a01e68aa9bce3c46ae2c3a47ba
MD5 56c7b7994a254a777862faa11323b1f1
BLAKE2b-256 ec37400feadf51fee08356602c5f3f85c975466a1c0fe5656631a061e9b0c0bd

See more details on using hashes here.

File details

Details for the file tulip_python-4.9.0-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.9.0-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 748c6f62978aace4c4685790c6877d3bee5f84bed8eb2824c36b564f3846af6e
MD5 ff0f6acc7424bab05d3a5e3055e7ee59
BLAKE2b-256 50d3a4b4c8eb7d4fc6772f592c2544c8e2fe7fedb4e8328db102bad511754e68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp33-cp33m-win_amd64.whl
Algorithm Hash digest
SHA256 11bec90291c0e7676a730fb92531a8c3b4626e216680b1a209eece766710b2a5
MD5 9d9ca215f7c29b219502c3c5acd33069
BLAKE2b-256 76cf01f776e2b27d88401e1991d0ace436921af754a4fe1dc2038176764ea2d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp33-cp33m-win32.whl
Algorithm Hash digest
SHA256 35b707af8417ac9558b95fff607e74f8137a204449932d527c473009fc1adb3f
MD5 6fc0aee16ea5fb2a73d197958b44f657
BLAKE2b-256 e11cd2cd407efe496b03c17075d6b81485cd93e811f5a6257f2289784984fec8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp33-cp33m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 28506907fd3bb418531ce61e4aec155a14ade8d566b6507411600b60a9cf5d20
MD5 c3db13dc9ba29b4376eba194c04c482b
BLAKE2b-256 13407aac4b18fb4124d87da3615fcdce05268360cedd6b7f3929fc5715707ce2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp33-cp33m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 36e24652fd9598410c016083a9f285bca810b5cbfd89548a6a4d2575f6f4297c
MD5 2f8db366e6e02ffe8d433b1e4d1fa80f
BLAKE2b-256 50f562fea6cf1191da9630cbf5605202b2f113850e1a2d6f68cc12484c3a57b6

See more details on using hashes here.

File details

Details for the file tulip_python-4.9.0-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.9.0-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 e73e027807966d94dad827c26fa7aa4edba3b9ff0202e27f2979619f2aa84677
MD5 f57b1b17c0e0f8a0770533f6ab758c92
BLAKE2b-256 7d819b2c6a7a37e586ff9676b64c70a5c761d1c9e39e927efa4b4359c76c51a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1324dd315581ef0f9b1fe25320f4a105ad67e78312f7d0d0ce9c65f996a7611b
MD5 75e0fdc342bb2a83ad3c1db7b6206a63
BLAKE2b-256 9dd28e481435865382f52e3284d8ebcdaa5c913d7c5340795917b8da49eae0c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0babb355c19d2895e593cbb45679bdd0d2b7baec4875dc50d54bb94d3d10966b
MD5 2863a3902c5cbbec1266d529f238d9d7
BLAKE2b-256 28e5c356f3245b9fad6da204acc2b359eff8e0d392e0c40726bf3c8c17f09106

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 294f0747fed7ce2b9c415e8f7638a2030e6f92af1f8daa63a249a159f7b2097a
MD5 4e217983695a72d1daf04c472311196c
BLAKE2b-256 f02dafdbe85d96f6fd29b0638dca7bd18f2dff3353b121a0540186d6cb493a53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 d5cb67a36cd13c720f2f2814199843275ed69dd9520539663c4cc138222ddfdd
MD5 6cf00b02b6bfc656fc7fb4b187fbd3f7
BLAKE2b-256 1b0d224661d9a19fb871979cfa3ddcf3c85780ea4f61aaeb74813966c825f311

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 809a15d6a9f738d13295dd2c2d7090d6c750fa72394b76e6be86fac8078fea08
MD5 8bd60a67f7c548765957ca320882ebff
BLAKE2b-256 a9abbdde65508a5f76256587e2aee8261048be68979169b3b93198d655ff223d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tulip_python-4.9.0-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2ecb36932a618cdc5aea7db44469e5087cedecfb043bb3073583a8cad59dde32
MD5 1d45811de1c90e3a76177793b0b75159
BLAKE2b-256 53a40f8bce7f1a2a024c541bf77659e80e32a202ee46b4c34c5ff48e265ee072

See more details on using hashes here.

File details

Details for the file tulip_python-4.9.0-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.9.0-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 0c8b5df888cde0b8cad40f3e33f78747c3c2d95568a2474280eb4c158f9101bf
MD5 490326423ef21de7a12a8df1b7da890a
BLAKE2b-256 80ea6774c50f69d9c68c0e69089ea291012f162d8df4f6b2b141b91f753eb6a6

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