# Graphviz — Open-Source Graph Visualization Software > A mature open-source graph visualization toolkit that renders structural information as diagrams from a simple text-based DOT language description. ## Install Save as a script file and run: # Graphviz — Open-Source Graph Visualization Software ## Quick Use ```bash # Install brew install graphviz # macOS apt install graphviz # Debian/Ubuntu # Render a graph echo 'digraph { A -> B -> C; A -> C; }' | dot -Tpng -o graph.png ``` ## Introduction Graphviz is an open-source graph visualization toolkit originally developed at AT&T Labs. It takes descriptions of graphs in the DOT text language and automatically computes layouts, rendering them as SVG, PNG, PDF, and other formats. It has been a standard tool in software engineering, networking, and data science for over two decades. ## What Graphviz Does - Renders directed and undirected graphs from DOT language descriptions - Automatically computes node positions using multiple layout algorithms - Outputs to SVG, PNG, PDF, PostScript, and other image formats - Provides programmatic APIs for C, Python, Java, and other languages - Supports subgraphs, clusters, custom node shapes, and edge styling ## Architecture Overview Graphviz consists of several layout engines, each implementing a different graph drawing algorithm. The ``dot`` engine handles hierarchical directed graphs using a layered approach. ``neato`` and ``fdp`` use force-directed placement for undirected graphs. ``circo`` creates circular layouts and ``twopi`` produces radial layouts. All engines read the same DOT input format and share the same rendering backend. ## Self-Hosting & Configuration - Install from system package managers on Linux, macOS, or Windows - Use the command-line tools directly: dot, neato, fdp, circo, twopi, sfdp - Integrate via Python bindings (graphviz package on PyPI) - Customize graph appearance with DOT attributes for nodes, edges, and clusters - Generate DOT files programmatically from any language and pipe to Graphviz ## Key Features - Multiple layout algorithms for different graph topologies - DOT language provides a readable text-based graph description format - Extensive output format support including SVG and PDF - Language bindings for Python, C, Java, and more - Battle-tested reliability across decades of production use ## Comparison with Similar Tools - **Mermaid** — Markdown-embedded diagrams rendered in browsers; Graphviz provides more layout algorithms and output formats - **D2** — Modern declarative diagram language; Graphviz has broader ecosystem support and more layout engines - **PlantUML** — UML-focused diagramming; Graphviz handles arbitrary graph structures beyond UML - **draw.io** — Interactive visual editor; Graphviz is code-first with automatic layout computation ## FAQ **Q: What is the DOT language?** A: DOT is a plain-text graph description language. You define nodes and edges, and Graphviz computes the layout automatically. **Q: Can Graphviz handle large graphs?** A: Yes. The sfdp engine is designed for graphs with thousands of nodes. For very large graphs, use sfdp or the sparse mode in neato. **Q: Is Graphviz still maintained?** A: Yes. Graphviz is actively maintained on GitLab and GitHub with regular releases. **Q: Can I use Graphviz in a web application?** A: Yes. Use the Viz.js or @hpcc-js/wasm libraries that compile Graphviz to WebAssembly for in-browser rendering. ## Sources - https://github.com/graphviz/graphviz - https://graphviz.org --- Source: https://tokrepo.com/en/workflows/asset-f9566caf Author: Script Depot