Archeometer.Graphs.Graphviz (Archeometer v0.5.0)
Functions for working with Graphviz graphs
Link to this section Summary
Functions
Renders an graph represented by an adjacency list into .dot format.
Renders an graph represented by an adjacency list into .png format.
Link to this section Functions
Link to this function
render_dot(xrefs, centrality \\ %{})
Renders an graph represented by an adjacency list into .dot format.
Returns a string containing de rendered graph.
examples
Examples
iex(2)> graph = %{
...(2)> :a => [:b, :c],
...(2)> :b => [:c, :d],
...(2)> :d => [:a]
...(2)> }
%{a: [:b, :c], b: [:c, :d], d: [:a]}
iex(3)> dot_str = Graphviz.render_dot(graph)
iex(3)> assert is_binary(dot_str)
Link to this function
render_image(xrefs, centrality \\ %{}, format \\ "png")
Renders an graph represented by an adjacency list into .png format.
Returns a binary containing the rendered graph.