Skip to main content

Visualization for DAGs

Project description

DAGVIZ

DAGVIZ offers a "git log"-like visualization for DAGs represented in networkx.

Installation

DAGVIZ can be installed with pip:

pip install dagviz

Documentation

Documentation is available at https://wimyedema.github.io/dagviz/.

Usage

DAGVIZ relies on networkx for the representation and manipulation of the DAG. An SVG file can be generated as follows:

    import dagviz
    import networkx as nx
    # Create the DAG
    G = nx.DiGraph()
    for i in range(5):
        G.add_node(f"n{i}")
    G.add_edge(f"n0", f"n1")
    G.add_edge(f"n0", f"n2")
    G.add_edge(f"n0", f"n4")
    G.add_edge(f"n1", f"n3")
    G.add_edge(f"n2", f"n3")
    G.add_edge(f"n3", f"n4")
    # Create an SVG as a string
    r = dagviz.render_svg(G)
    with open("simple.svg", "wt") as fs:
        fs.write(r)

Project details


Download files

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

Source Distribution

dagviz-0.4.0.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

dagviz-0.4.0-py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 3

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