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
Release history Release notifications | RSS feed
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 details)
Built Distribution
dagviz-0.4.0-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file dagviz-0.4.0.tar.gz
.
File metadata
- Download URL: dagviz-0.4.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26403c93c93fc1df277072d931e4e834c6237ef083f1058552b2392c036d6901 |
|
MD5 | 7ba42e0de39f2c860c53112a49c2a815 |
|
BLAKE2b-256 | 707a09625b8731f90cb24c170ead9a0963a09dda03d2fb32613f43d34c172b1b |
File details
Details for the file dagviz-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: dagviz-0.4.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb348d7432d6c1b632a16d90151886a71fc29f837825eefb3e32144ad5c63fd4 |
|
MD5 | fc9d3e4a78222d4b3aa0c8247eafa5ca |
|
BLAKE2b-256 | aef6ff13204937c7ece4bd4436748f5547f629cb7272aca2e7f2419f08d9f681 |