Consider the following code:
\documentclass[tikz, border=1pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}% To get more advances positioning options
\usetikzlibrary{arrows}% To get more arrow heads
\usetikzlibrary{math,calc}
\usepackage{xcolor}
\definecolor{MyColor1}{rgb}{0.24, 0.59, 0.32}
\definecolor{MyColor2}{rgb}{0.85, 0.49, 0.19}
\definecolor{MyColor3}{rgb}{0.22, 0.42, 0.69}
\begin{document}
\begin{tikzpicture}
\foreach \x in {0,1,2}{
\draw[fill=MyColor1] (\x, 0) circle (2pt) node[anchor=south] (\x) {$V_{\x}$};
}
\draw[fill=MyColor1] (3, 0) circle (2pt) node[anchor=south] (3) {$V_{n-1}$};
\draw[fill=MyColor1] (4, 0) circle (2pt) node[anchor=south] (4) {$V_n$};
\foreach \x in {-1,5}{
\node at (\x,0) (\x) {$0$};
}
\node at (2.5,0) {$\dots$};
\draw[->, MyColor3] (0) to [out=75, in=105] (1) node at (0.5,0.95) {$e$};
\draw[->, MyColor3] (1) to [out=75, in=105] (2) node at (1.5,0.95) {$e$};
\draw[->, MyColor3] (3) to [out=75, in=105] (4) node at (3.5,0.95) {$e$};
\node (tmp) at (-0.05,-0.35) {};
\node (tmp2) at (0.05,-0.35) {};
\draw[->, MyColor2] ($(1)+ (tmp)$) to [out=-105, in=-75] ($(0)+(tmp2)$) node at (0.5,-0.6) {$f$};
\draw[->, MyColor2] ($(2)+ (tmp)$) to [out=-105, in=-75] ($(1)+(tmp2)$) node at (1.5,-0.6) {$f$};
\draw[->, MyColor2] ($(4)+ (tmp)$) to [out=-105, in=-75] ($(3)+(tmp2)$) node at (3.5,-0.6) {$f$};
\draw[->, MyColor2] ($(0)+ (-0.05,-0.35)$) to [out=-105, in=-75] ($(-1)+ (0.05,-0.15)$) node at (-0.5,-0.6) {$f$};
\draw[->, MyColor3] (4) to [out=75, in=105] ($(5)+ (-0.05,0.53)$) node at (4.5,0.95) {$e$};
\foreach \x in {0,1,2,3,4}{
\path[->, MyColor1] ($(\x)+(0,0.3)$) edge [loop above, out=120, in=60, looseness=8] node {$h$} ($(\x)+(0.5,0.3)$);
}
\end{tikzpicture}
\end{document}
I would like the green arrows to be pointing to itself. I therefore tried to modify the line
\path[->, MyColor1] ($(\x)+(0,0.3)$) edge [loop above, out=120, in=60, looseness=8] node {$h$} ($(\x)+(0.5,0.3)$);
to
\path[->, MyColor1] ($(\x)+(0,0.3)$) edge [loop above, out=120, in=60, looseness=8] node {$h$} ($(\x)+(0,0.3)$);
following the answer of this question, but this results in only the arrow heads being drawn in place. I also tried the following
\path[->, MyColor1] ($(\x)+(-0.025,0.3)$) edge [loop above, out=120, in=60, looseness=8] node {$h$} ($(\x)+(0.025,0.3)$);
(baisically shifting the center to the label and then just making the gap between beginning and end smaller), but this resulted in a very small arrow... Can somebody maybe help a bit?
PS: I'm aware of the fact that I'm doing something wrong by constantly manipulating coordinates to specify beginning and end of arrows, etc. but I just don't really know how to do it otherwise.. If someone wants to suggest a solution for that as well, then it's obviously very appreciated!


