If you’ve ever had to draw “blocks and arrows” diagrams, you’ll know how irritating it can be if you spend hours laying out the diagram using a presentation editor or drawing tool, only to find you need to edit the drawing, add another box, and lay the whole thing out again.
Surely there must be a better way?
Let’s just think about what a box and arrow diagram is intended to show: when describing a process, the connections typically represent a flow from one thing to another; furthermore, the layout is often rectilinear, laid out along straight lines, the boxes tidily spaced and their edges lined up with each other. In a diagram such as a mindmap, different ideas or concepts are related to each other by drawing a line between them and the layout may be more fluid, with like or related concepts grouped together in space, or by the additional use of colour themes, for example.
The primary information contained in the diagram are the text elements and the connections between them. The positioning on the page often reflects the structure of these connections. When we lay out a diagram, we unconsciously favour layouts that minimise the number of crossed lines (to keep the diagram “clean” looking), and group connected items close together (unless some other information requires us to separate them – for example, we might be using a timeline basis for a horizontal x-axis and placing boxes in areas of the canvas we are working on that are associated with a particular month).
The online Google Drawing document type is typical of drawing tools included in many office applications. As well as being able to draw boxes and connect registration points on each box by lines or arrows, a range of layout tools provides support for aligning and spacing boxes.
Tools such as popplet provide a friendlier environment for generating similar sorts of diagram:
Whilst drawing tools such as these allow you to craft your diagram by hand, building it up as you go along, actually putting previously collected information into blocks on the canvas, let alone connecting the blocks together and laying them out nicely, may be quite an involved and error prone affair.
In these circumstances, it may make more sense to take a raw representation of the block contents and a simple representation of connections between appropriate blocks and just write the relationships down, letting a drawing tool do the hard work of drawing the blocks, connecting them together and laying them out, at least in draft layout form. To provide for a final layer of customisation, it might also be useful to be able to take a vector/SVG representation of the automatically sketched layout into a drawing package where it can be tidied up by hand and the application of a human designer’s eye.
There are several online tools available that you can use to sketch box and arrow diagrams from simple text descriptions.
Text2mindmap
Text2Mindmap allows you to construct tree based mindmaps from a simple outline style description of the mindmap.
The layout has a radial basis. Designs can be saved and images downloaded as JPG or PDF files.
Diagrammr
Diagrammr allows you to draw simple graph based network structures in which text labelled block elements can be connected to other blocks by labelled edges.
Designs are given a persistent URL, but anyone with access to the URL can edit the diagram.
JS Sequence Diagrams
JS Sequence Diagrams is a javascript library for generating sequence diagrams from a textual description of them.
Diagrams can be saved as SVG files. The source code is available and depends on Jison and Raphaël as the graphics library.
blockdiag
blockdiag (application) uses a language similar to the DOT language for describing a range of block diagram types (block diagrams, sequence diagrams, activity diagrams, logical network diagrams).
Diagrams can be saved as SVG diagrams and associated with a URL that contains all the information used to recreate the diagram. As such, large diagrams are not supported if they make the URL too long. Source code is available.
Several diagram types are available using blockdiag, including graphviz diagrams constructed using the DOT language.
GraphvizFiddle
GraphvizFiddle is a fiddler style application that lets you enter Graphviz DOT language descriptions and preview the result.
Files can be generated in SVG format, or a textual definitions (for example, in the dot layout language).
Summary
Generating boxes and arrows style diagrams can be a pain at times because the semantics of the diagram – how one item is related to another – is represented in a graphical rather than data based form. By writing down the relations and then automatically generating visual representations of them, we retain access to the data representation whilst letting the hard work of generating the initial draft, at least, of the layout to a machine.
Several tools are available to support the creation of such literally described box and arrow diagrams using a variety of description languages and generating a range of output image formats (SVG probably being the most useful if you need to edit the sketch diagram for yourself to tweak the layout for its final presentation). Code for some of the tools (JS Sequence diagrams, blockdiag) is available.
Arguably the most powerful tools allow you to “write” diagrams using the Graphviz DOT layout language. Whilst there is a certain overhead associated with learning this language, it does save time in the long run if you regularly need to create network style diagrams. Graphviz also supports a range of layout algorithms – see the Graphviz gallery for examples.
PS If you want to write your own diagramming application, the JointJS library looks like a handy library to have on hand… The Venn.js library also looks quite pretty – if you have to generate Venn diagrams, that is!
My favourite is Plantuml, which does a variety of diagrams: http://plantuml.com/, complete with an online version. http://www.plantuml.com/plantuml/. It’s open source (based on Graphviz), which is comforting.
[Amazon] -down-> [Audible] : Owns
[Audible] -down-> [eBooks] : Does
cloud “Amazon Cloud” {
[AWS]
[EC2]
[SQS]
}
Looks like this: http://www.plantuml.com:80/plantuml/png/YtRCJQpApujLq4t9By_JjLE8TYnDoKpAIOrLi5BmByyhva88m9MaEkNdPnU3LBZafnPp0K5oJdvfYe8In305Pn1FIQ4Qg3SyE9OhsjNP24W61mBPjLn0GPYL8Dk02e3c19M2RG9nuBQ0T06bFFEISqfJKZ6aGSOXIGC0
@ptsefton Thanks Pete – I’d not seen that one before. Are there any other classes of text2diagram generator that I’m missing (excluding formalised chart generating languages like R/ggplot2, python/matplotlib, and even gnuplot etc)?