MCPcopy Create free account
hub / github.com/elftausend/graplot / main

Function main

examples/graph_modified.rs:3–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1use graplot::{Graph, graph::{EdgeColor, GraphDesc}, RED, MAGENTA};
2
3fn main() {
4 let mut graph = Graph::new();
5 graph.graph_desc = GraphDesc {
6 title: String::from("Graph"),
7 node_color: RED,
8 egde_color: EdgeColor::Use(MAGENTA),
9 ..Default::default()
10 };
11 let a = graph.add_node(vec![]);
12 let b = graph.add_node(vec![]);
13 let c = graph.add_node(vec![]);
14
15 let d = graph.add_node(vec![a.idx, b.idx]);
16 let e = graph.add_node(vec![a.idx, c.idx]);
17
18 let _f = graph.add_node(vec![d.idx, e.idx, b.idx]);
19
20 graph.show();
21}

Callers

nothing calls this directly

Calls 2

add_nodeMethod · 0.80
showMethod · 0.45

Tested by

no test coverage detected