tikzpicture: How can I draw a loop right-below?
For example, specifying angles for in and out:
\draw (3) to [out=330,in=300,looseness=8] (3);
In tkz-graph, the loop is placed with dir=SOEA
south east
Picture
Code
\documentclass{article}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,thick]
\SetGraphUnit{3}
\tikzset{VertexStyle/.style = {draw,circle,thick,
minimum size=1cm,
font=\Large\bfseries},thick}
\Vertex{1} \SOWE(1){2} \SOEA(1){3}
\Edges(3,2,1) \Edge(3)(1)
\Loop[dist=2cm,dir=NO,label=$0.6$,labelstyle=above](1)
\Loop[dist=2cm,dir=SOEA,label=$0.8$,labelstyle=below right](3)
\path[every node/.style={swap,auto}] (2) to node {0.1} (1)
to node {0.1} (3)
to node {0.1} (2);
\draw[->] (1) to [bend right] node [above left] {0.4} (2);
% it's possible with \Edge but Tikz's syntax is allowed too.
\end{tikzpicture}
\end{document}
If, like me, you want to add text above the loop created with Stefan Kottwitz's solution and you struggle doing so using \draw
, here's what you could do using \path
:
\path (3) edge [out=330,in=300,looseness=8] node[above] {0.8} (3);