Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool to create ASCII graph from a set of vertices and edges?

Tags:

graph

ascii

Is there a tool that takes as input a series of vertices and edges, and outputs a graph in ASCII/Unicode format?

Thanks, Kevin

like image 299
Kevin Burke Avatar asked Jul 30 '11 22:07

Kevin Burke


2 Answers

In addition to Graph::Easy mentioned by @nibot, there are a couple of other tools around for this:

  • Vijual (Clojure): http://lisperati.com/vijual/
  • ascii-graphs (Scala): https://github.com/mdr/ascii-graphs

(Disclaimer: I'm the developer of the latter).

like image 95
Matt R Avatar answered Nov 25 '22 09:11

Matt R


Yes! Perl has Graph::Easy, as described in this Hacker News comment.

Here's some output from the online demo:

........     +---------+     +-----+
: Bonn : --> | Berlin  | ..> | Ulm |
:......:     +---------+     +-----+
               H
               H train
               v
             +---------+
             | Koblenz |
             +---------+
like image 35
nibot Avatar answered Nov 25 '22 09:11

nibot