Skip to main content

A graph visualization tool

Project description

treevizer

Repo for visualizing tree datasctructures in Python. Depend on Graphviz.

It builds dot files based on linked node objects. It creates the dot files and then calls Grapviz to turn them into pictures.

Dependencies

This repo use Graphviz to create pictures from dot files. After installing Graphviz don't forget too add it to Path!

Config

It is possible to change the Dot configuration to alter the resulting graph. To se available options look at Graphviz's Dot documentaion. Put configuration in json format in .dot.json in your project folder.

Available parts to configure are the entire graph, vertexes/nodes and edges/arrows.

Example for changing color on arrows and nodes for the BalancedBinaryTreeGraph.

{
    "BalancedBinaryTreeGraph": {
        "node": {
            "fillcolor": "green",
        },
        "edge": {
            "color": "blue"
        }
    }
}

Development

Run make help to see available commands.

Cygwin

Integration tests don't work on cygwin. Images created on cygwin don't match with images created on Linux.

To-Do

  • Test on MacOS.
  • Test on Linux.
  • Add package to pip site so can pip install.
  • Fix a properly readme.
  • Add support for linked lists.
  • Tox.
  • To not have .dot.json be mandatory.
  • Turn it into pip project.
  • Fix main.tree_to_dot(). It does not work.
  • Support cygwin.
  • Add red color to edges who couldn't be added and the Node it adds.
  • Remove depency on igraph. https://eli.thegreenplace.net/2009/11/23/visualizing-binary-trees-with-graphviz
  • Test on WSL.
  • Test on Cygwin - Can't install igraph. Not supported.

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 Distribution

treevizer-0.0.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file treevizer-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: treevizer-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for treevizer-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb59e997ea5e28fb9c097410cd5662eeddc3bece410c03b9590a12e529e5091
MD5 43caee562220a618baff35217beef096
BLAKE2b-256 2ad4c39580b62af8f88a8f854fd0bcc7bfd3b765bf65dec670ee667455fd991b

See more details on using hashes here.

Supported by

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