I am fairly new to LaTeX and especially to tikz. I tried to draw a directed graph which actually turned out the way I wanted it to. I don't know how well written this code is, but it works. Code in question:
\begin{tikzpicture}[>=Stealth,->,line width=1pt, domain=0:2,label/.style={%
postaction={ decorate,transform shape,
decoration={ markings, mark=at position 0.5 with \node #1;}}}]
\matrix [matrix of math nodes,
column sep={1.5cm,between origins},
row sep={2.2cm,between origins},
nodes={circle, draw, minimum size=1cm}] {
& |(1)| J & & |(2)| A & \\
& & |(3)| R & \\};
\draw[label={[below]{$50$}}] (2)--(1);
\draw[label={[below]{$25 \%$}}] (3)--(2);
\draw[transform canvas={xshift=2pt, yshift=2pt}, shorten <= -1pt, label= {[below]{$100$}}] (3)--(1);
\draw[transform canvas={xshift=-2pt, yshift=-2pt}, shorten <= -1pt, label= {[below]{$2 \%$}}] (1)--(3);
\end{tikzpicture}
However, after discovering a working solution to add labels to the lines drawn, I now have the problems that the topmost label is upside down. Why this is so, is clear to me, however I don't know how to fix it.
I have read something about doing stuff like
\draw[label={[below, rotate=180]{$50$}}] (2)--(1);
but it's not working.
If you happen to know how to solve my problem or improve the structure of the directed graph, I would be very grateful!