[texhax] Drawing graphs with TikZ

Tom Backer Johnsen backer at psych.uib.no
Sun Dec 2 10:56:40 CET 2007


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?

Tom



More information about the texhax mailing list