#graphviz #dot #hypergraph #visualize #svg #lax

open-hypergraphs-dot

A library for visualizing lax open hypergraphs in GraphViz DOT format

10 releases

0.2.4 Mar 16, 2026
0.2.3 Nov 22, 2025
0.2.1 Jun 11, 2025
0.2.0 May 29, 2025
0.1.2 Apr 10, 2025

#423 in Visualization


Used in 4 crates

MIT license

125KB
513 lines

Open Hypergraphs Dot

A Rust library for visualizing lax open hypergraphs using the GraphViz DOT format.

Get Started

Add the crate with the svg feature for simplest use:

cargo add open-hypergraphs-dot --feature svg

Then you can save an Open Hypergraph to an SVG in one line:

use open_hypergraphs_dot::{Options, svg::to_svg_with};
std::fs::write("out.svg", to_svg_with(&term, &Options::default())?);

If you want non-standard options, you can use the fluent options interface:

// use defaults in Left-to-right orientation, using Display instance for nodes and edges
let opts = Options::default().display().lr();
std::fs::write("out.svg", to_svg_with(&term, &opts)?);

Examples

Run the adder example:

cargo run --example adder

This will produce the following depiction of an open hypergraph representing a 2-bit ripple-carry adder:

See ./examples/adder.rs for the source code producing this example.

Dependencies

~0.4–6MB
~133K SLoC