<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">The obvious way to visualise a graph would be to drive</div><div class="gmail_default" style="font-family:monospace,monospace">something like GraphViz or Gephi or, ideally, UbiGraph</div><div class="gmail_default" style="font-family:monospace,monospace">(<a href="https://github.com/alan86alves/ubigraph_server">https://github.com/alan86alves/ubigraph_server</a> has a</div><div class="gmail_default" style="font-family:monospace,monospace">copy of the Linux x86-64 version; the official source</div><div class="gmail_default" style="font-family:monospace,monospace">is currently unreachable).  There is an erlubi. But</div><div class="gmail_default" style="font-family:monospace,monospace">perhaps the thing you might want to look at first is</div><div class="gmail_default" style="font-family:monospace,monospace"><a href="https://github.com/aol/erlgraph">https://github.com/aol/erlgraph</a></div><div class="gmail_default" style="font-family:monospace,monospace">It will take a bit of patching to get up to date with</div><div class="gmail_default" style="font-family:monospace,monospace">current versions of Erlang and Cowboy.<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 9 Apr 2019 at 11:29, <<a href="mailto:lloyd@writersglen.com">lloyd@writersglen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="2" face="arial"><p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">The Erlang digraph library looks like it may provide an interesting way to diagram scenes in a novel.</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">1> Scene10 = digraph:new().</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Imagine:</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Setting:"park"</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Character1:"Franco"</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Character2:"Sophia"</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">2> digraph:add_vertex(Scene10, "Park", "Night").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">3> digraph:add_vertex(Scene10, "Franco", "Old and fat").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">4> digraph:add_vertex(Scene10, "Sophia", "Young and beautiful").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">5> digraph:add_edge(Scene10, "Franco", "Sophia", "loves").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">OK to here EXCEPT command 5 returns:</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">['$e'|0]</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">OK to here EXCEPT command 5 returns:</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">['$e'|0]</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">6> digraph:add_edge(Scene10, "Sophia", "Franco", "hates").</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">['$e'|1]</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Wah!</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Question 1: How do I see labels?</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Question 2: Be cool to add a sequence of actions. I can probably figure this out, but is there an elegant solution?</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Question 3: I'd love to visualize the graph. I see it can be done in Elixir. But I don't know Elixir. Has anyone programmed a way to visualize digraphs in Erlang?</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Comment: Digraph is crying out for a comprehensive tutorial. I'd love to do it, but just don't know enough yet.</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Many thanks,</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">LRP</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
</font>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>