[texhax] Drawing graphs with TikZ

Tom Backer Johnsen backer at psych.uib.no
Sun Dec 2 11:28:59 CET 2007

Tom Backer Johnsen wrote:
> Recently I have been trying to make figures of directed graphs (nodes 
> and arrows between them) , and all my efforts have failed.  I simply 
> do not understand what is going on.  As a final attempt, I have tried 
> to reproduce the figure on page 36 of the Tikz and pgf manual (version 
> 1.18), where the latex file has been reduced to the bare essentials 
> like this:
> \documentclass{article}
> \usepackage{tikz}
> \begin{document}
> \begin{tikzpicture}
>     \path ( 0:2) node [shape=circle,draw] {}
>           ( 0:1) node [shape=circle,draw] {}
>           ( 0:0) node [shape=circle,draw] {}
>           ( 1,1) node [shape=rectangle,draw] {}
>           (-1,1) node [shape=rectangle,draw] {};
> \end{tikzpicture}
> \end{document}
> This results in a figure nothing like the one in the manual, where the 
> circles are all along a horizontal line (rather than vertical) with 
> the squares above and somewhat to the left of the sequence of the 
> circles.  As far As I am able to see, this is an exact reproduction of 
> the example.
> Can anyone point at my error?

It is really strange.  So often, when you do any kind of programming 
you see your error, but not before the question is out.  In this case 
it is the colons in the circle that yields the unexpected results 
without any kind of message.



More information about the texhax mailing list