Search code examples
graphascii

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


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

Thanks, Kevin


Solution

  • 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 |
                 +---------+