Moving arrow to the bottom of the graph using graphviz

I cannot tell you how to steer graphwiz but such things can be done easily without this tool.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,chains}
\begin{document}
\begin{tikzpicture}[circ/.style={draw,thick,minimum size=1cm,circle,align=center},
cc/.style={on chain,join,circ},start chain=going right,
every join/.append style={-latex,thick},
node distance=8mm,font=\sffamily]
 \foreach \X in {1,...,5}
 {\node[cc] (\X){\X};}
 \node[above=of 3,circ] (0){0}; 
 \foreach \X in {1,...,5}
 {\draw[-latex,thick] (0) -- (\X);}
 \draw[-latex,thick] (5) to[out=-135,in=-45] (1);
\end{tikzpicture}
\end{document}

enter image description here


Set the direction of an edge by adding :n, :ne, :e, … as the compass direction of the edge. So, replace 5 -> 1 with 5:s -> 1 as follows:

digraph G {
  rankdir = TB
  node [shape = circle]
  1 -> 2
  2 -> 3
  3 -> 4
  4 -> 5
  5:s -> 1
  0 -> 1
  0 -> 2
  0 -> 3
  0 -> 4
  0 -> 5
  {rank = same 1 2 3 4 5 }
}

Graphviz dot graph

Tags:

Graphs