Crates.io | dotavious |
lib.rs | dotavious |
version | 0.2.1 |
source | src |
created_at | 2021-03-23 03:17:49.889927 |
updated_at | 2021-11-06 20:13:16.095361 |
description | A library for generating Graphviz DOT language files for graphs. |
homepage | |
repository | https://github.com/doctavious/dotavious |
max_upload_size | |
id | 372379 |
size | 177,364 |
A library for generating Graphviz DOT language files for visualizing graphs.
Not every Attribute is fully documented/described. However, all those which have specific allowed values should be covered.
Deprecated Attributes are not defined.
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