Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a big picture made, but I can't get my nodes to get a loop (an arrow to itself).

My code:

\begin{tikzpicture}
\matrix (mat) [matrix of nodes] 
{ 
|[draw,circle]|$(0)$  &[10mm] $\begin{bmatrix} u^{(0)}_0 \\ u^{(0)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(0)}_{00} & \sigma^{(0)}_{01} \\ \sigma^{(0)}_{10} & \sigma^{(0)}_{11} \end{bmatrix}$ & \\
|[draw,circle]|$(1)$ & $\begin{bmatrix} u^{(1)}_0 \\ u^{(1)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(1)}_{00} & \sigma^{(1)}_{01} \\ \sigma^{(1)}_{10} & \sigma^{(1)}_{11} \end{bmatrix}$ &  $\begin{bmatrix} u^{(0)}_0 \\ u^{(0)}_1 \\ u^{(1)}_0 \\ u^{(1)}_1 \\ u^{(2)}_0 \\ u^{(2)}_1 \end{bmatrix}$ \\
|[draw,circle]|$(2)$ & $\begin{bmatrix} u^{(2)}_0 \\ u^{(2)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(2)}_{00} & \sigma^{(2)}_{01} \\ \sigma^{(2)}_{10} & \sigma^{(2)}_{11} \end{bmatrix}$ &   \\
};

\draw [->] (mat-1-1) -- (mat-2-1);
\draw [->] (mat-2-1) to [bend right=35] (mat-1-1);
\draw [->] (mat-2-1) -- (mat-3-1);
\draw [->] (mat-3-1) to [bend right=35] (mat-2-1);

\draw [->] (mat-1-1) to [bend left=55] (mat-3-1);
\draw [->] (mat-3-1) to [bend left=55] (mat-1-1);

\draw [->,loop above,looseness=16,min distance=15mm] (mat-1-1); 


\end{tikzpicture}

The interesting part is the last \draw command which doesn't seem to have any effect. What should I do to display a loop above my node?

Currently it looks like this:

my tikz image

share|improve this question

1 Answer 1

up vote 7 down vote accepted

It works this way:

\draw (mat-1-1) to [->,loop above,looseness=16,min distance=15mm] (mat-1-1); 

alt text

share|improve this answer
1  
Thanks, that works indeed. Do you also know why my way did not work? –  Peter Smit Oct 26 '10 at 5:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.