3 unstable releases
0.2.1 | Nov 6, 2021 |
---|---|
0.2.0 | Mar 25, 2021 |
0.1.0 | Mar 23, 2021 |
#241 in Visualization
24 downloads per month
155KB
3K
SLoC
Dotavious
A library for generating Graphviz DOT language files for visualizing graphs.
Constraints / Limitations
- Not every Attribute is fully documented/described. However, all those which have specific allowed values should be covered.
- Deprecated Attributes are not defined.
Quickstart
use dotavious::{Dot, Edge, Graph, GraphBuilder, Node};
use std::io;
use std::io::Read;
// can also start building a named undirected graph via `GraphBuilder::new_named_undirected`
let graph = GraphBuilder::new_named_directed("example")
.add_node(Node::new("N0"))
.add_node(Node::new("N1"))
.add_edge(Edge::new("N0", "N1"))
.build()
.unwrap();
let dot = Dot { graph };
println!("{}", dot);
which produces
digraph example {
N0;
N1;
N0 -> N1;
}
and when rendered will look like
Dependencies
~1MB
~16K SLoC