LaTeX forum ⇒ Graphics, Figures & TablesArrow in middle of loop Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

Arrow in middle of loop

Postby psionman » Sat Sep 27, 2014 6:40 pm

I am attempting to produce an arrow half way along a loop. I can produce an arrow half way along a line, but how can I get the arrow in the middle of the loop?

  1. \documentclass{article}
  2. \usepackage{tikz}
  3. \usetikzlibrary{arrows,decorations.markings}
  4.  
  5. \begin{document}
  6.  
  7. \begin{tikzpicture}[scale=1]
  8. \draw[fill=black](0,0) circle (0.5mm) coordinate(1);
  9. \draw[fill=black](3,0) circle (0.5mm) coordinate(2);
  10.  
  11. \begin{scope}[thick,decoration={markings, mark=at position 0.5 with {\arrow{>}}}]
  12. \draw[postaction={decorate}] (1) -- (2);
  13.  
  14. \tikzset{loop/.style={min distance=10mm,in=-45,out=45}}
  15. \path [postaction={decorate}](2) edge [loop left] (2);
  16. \end{scope}
  17. \end{tikzpicture}
  18.  
  19. \end{document}

Thanks

psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

Postby psionman » Tue Sep 30, 2014 7:35 pm

As no one seems to able to help I've used a workaround using

  1. \draw [postaction={decorate}] (1) .. controls (a) and (b) .. (1);


Thanks to all who read

User avatar
Stefan Kottwitz
Site Admin
Posts: 9568
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Oct 01, 2014 2:50 pm

Thank you for posting your solution!
I was also wondering how to do it.

Stefan
LaTeX.org admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests