My problem is related to TikZ: How to draw an arrow in the middle of the line?:

My Example: I like to have two circles - I want to position the arrow of circle no. 1 at south.south west of circle no. 1 and the arrow of circle no. 2 at north.north east of circle no. 2.

My personal "Hack":

\begin{tikzpicture}[node distance=2cm]
\begin{scope}[every node/.style={sloped,allow upside down,circle,
  fill=black,inner sep=2pt}]
\node[draw,fill=white,inner sep=10pt, xshift=-0.49cm] (loop) {};
\node (n1){} ;
\node[draw,fill=white,inner sep=10pt,right of=n1,xshift=0.49cm] (loop2) {};
\node (n2) [right of=n1] {};
\draw (loop)-- node {\midarrowcirc} (loop);
\draw (n1)-- node {\midarrow} (n2);
\draw (loop2)-- node {\midarrowcirc} (loop2);

Unfortunately I am not able to position the arrows. Thank you for any help!

P.S. Sorry, maybe to much libraries - it is based to my trials ...

  • Is it necessary to draw the circles as nodes? Placing arrows on \draw circles is easier.
    – Caramdir
    Dec 20, 2010 at 14:51
  • I would be pleased to learn it - could you please give me an advice? Although I read the pgf-manual, until now I could not find out how to do it :(
    – Petra
    Dec 20, 2010 at 15:32
  • You forgot to paste the definitions of \midarrowcirc and \midarrow.
    – Caramdir
    Dec 20, 2010 at 16:47
  • See also: tex.stackexchange.com/questions/1260/…
    – Caramdir
    Dec 20, 2010 at 16:48

1 Answer 1


This is how I would solve the problem (given that I understood it correctly):



    % draw the two circles and decorate them with arrows
        decoration={markings, mark=at position 0.625 with {\arrow{>}}},
        (0,0) circle (0.5);
        decoration={markings, mark=at position 0.125 with {\arrow{>}}},
        (3,0) circle (0.5);

    % draw the connecting line
        decoration={markings, mark=at position 0.5 with {\arrow{>}}},
        (0.5,0) -- (2.5,0);

    % draw the two black dots
    \fill (0.5,0) circle (0.1); 
    \fill (2.5,0) circle (0.1); 


Drawing circles is described in section 14.7 “The Circle and Ellipse Operations” of the TikZ manual (all numbers refer to the v2.10 manual). The general syntax is (<center>) circle (<radius>).

The arrows are added as decorations (chapters 21 “Decorated Paths” and 30 “Decoration Library”). Specifically we add a mark in the form of an arrow at the given position. The position is given in the range [0,1] with 0 the start and 1 the end of the path. Circles always start and end at the rightmost point and are traversed counterclockwise.

As the markings decoration replaces the path with the specified path without first drawing the path, we need to first draw the circle normally and then add the decoration with a postaction (which acts on a copy of the path).

  • Yes! :) I just have to change the direction of the arrows from '>' to '<'. Thank you very much!!
    – Petra
    Dec 20, 2010 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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