Take the 2-minute tour ×

I need to generate a diagram showing relationships between points. I can convert my data into a simple syntax, such as this below (other forms of syntax is okay too):

A (B, C) % A is connected to B and C
C (A, D, E, F) % C is connected to A, D, E, and F

The resulting information should be converted into some kind of diagram, such as this:

 \                      /
  C-----D              /
 / \     \            /
E---F     G          /
 \   \   / \        /
  \   H /   I      /
   \   /   /|     /
    \ /   / |    /
    / \ /    \ / \
   N   O      P   Q
  • The points will contain words, e.g.

    "ocean" ("current", "tidal wave")

  • These points should never be placed on top of other points, otherwise, it would be difficult to read them.

  • There are no arrows at the ends of the lines.
  • There are no labels at the mid-points of the lines.

Are there any tools which can generate such a diagram?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Have a look at graphviz and dot2tex. The dot program in the graphviz suite should let you define the relationships and dot2tex should convert it to Tikz for you. You can turn the TikZ into pdf with LaTeX.

I haven't used dot2tex but I have used dot: it's easy to use.

share|improve this answer

I enter the coordinates line after line, I think it's not too difficult. If some words are too long, you can modify the value of x.


% style
\tikzset{VertexStyle/.style = {draw, shape=rectangle}}
\tikzset{EdgeStyle/.style   = {dashed,color  = orange}}  

% vertex
\foreach \xv/\yv/\v/\Lv in {%
 0/0/A/Word 1, 10/0/B/Word 2,
 1/1/C/Word 3, 5/1/D/Word 4,
 0/2/E/Word 5, 2/2/F/Word 6, 6/2/G/Word 7,
 3/3/H/Word 8, 7/3/I/Word 9,
 2/5/J/Word 10, 4/5/K/Word 11, 6/5/L/Word 12, 8/5/M/Word 13,
 1/6/N/Word 14, 3/6/O/Word 15, 7/6/P/Word 16, 9/6/Q/Word 17}%
% edges
\Edges(N,J,K,L,M,Q) \Edges(G,J) \Edges(E,F)   


enter image description here

share|improve this answer

Your Answer


