Graph::Easy
Graph::Easy is a plain-text language for describing graphs that is also the name of the Perl module that reads and renders it. Both the format and the tooling were originally written by the Perl author known as Tels (roughly 2004-2008) and later maintained by Shlomi Fish; the reference implementation is distributed on CPAN (current release 0.76, 2016) and is the canonical way to produce and consume the format via the tool:graph-easy command-line utility and library.
The language is deliberately terse and human-editable. Nodes are written in square brackets, e.g. [ Bonn ], and edges are drawn as ASCII arrows between them: --> for a directed edge, -- for an undirected one, and variants such as <=>, ==>, ..>, - > (dashed) and ~~> (wave) to encode bidirectionality and line style. Edge labels sit on the arrow ([A] -- label --> [B]), and styling is expressed with CSS-like declarations in curly braces applied to individual nodes, to whole classes (node { color: red; }), to the graph, or to named groups that act as subgraphs. This makes the notation feel closer to format:mermaid or format:d2 than to the verbose attribute lists of format:dot, while covering much of the same conceptual ground.
Its distinguishing feature is the built-in grid-based ("manhattan") layout engine, which places boxes on a lattice and routes orthogonal edges so a graph can be rendered directly as ASCII art, as Unicode box-drawing "boxart", as HTML tables, or as SVG (via the optional Graph::Easy::As_svg module). This makes it a popular choice for embedding diagrams in READMEs, code comments, terminals and technical documentation where an image pipeline is unwanted.
Graph::Easy also functions as a format converter. Its parser reads its own text syntax as well as format:dot, VCG (format:vcg-1.30) and the related GDL (format:gdl-aisee), and it can dump a loaded graph back out as Graph::Easy text, DOT, VCG, GDL or format:graphml — so it bridges the Graphviz and aiSee/VCG ecosystems. Limitations are candidly documented: the layouter is unoptimized and single-pass (no scoring or second-stage simplification), inter-group links and some edge attributes are not handled, and the ASCII/boxart grid produces coarser, less compact drawings than Graphviz's tool:graphviz engine on large or densely connected graphs.
Alternative Names: Graph::Easy text
Tools(Read & Write)
Frequently Asked Questions
What is a Graph::Easy text format file?
A Graph::Easy text format file stores a graph — its nodes, edges and attributes — in the Graph::Easy text format format (also: Graph::Easy text). See the feature table above for what it supports.
How do I open a Graph::Easy text format file?
Open it in a graph tool that supports Graph::Easy text format, or convert it to a format your tool reads. With GraphInOut you can convert Graph::Easy text format to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a Graph::Easy text format file to another format?
Use the Convert from Graph::Easy text format link above: upload or paste your Graph::Easy text format file (input preset to Graph::Easy text format), choose a target format and download the result — free, no install.