This question already has an answer here:

I used the Tikz to draw a directed graph. But the problem is the orientations are the end of edges. I need something like the following picture:

enter image description here

But my graph is in the following picture.

enter image description here

marked as duplicate by Ruben, Mico, Heiko Oberdiek, Paul Gaborit tikz-pgf Aug 5 '15 at 11:17



There are lots of ways, for example:


  \foreach \a/\pos [count=\i] in {%
    135/115} {
    \draw[thick, -{Circle[open]}] (0, 0) -- (\a:20mm);
    \node at (\pos:10mm) {$I_{\i}$};
  \foreach \a/\direction in {0/<, -45/>, -90/<, -135/>, 135/<} {
    \draw[thick, >={Stealth},-\direction] (0, 0) -- (\a:11mm);
  \node[at=(current bounding box.south), below=2ex, inner sep=0pt]
    {$I_1 - I_2 + I_3 - I_4 + I_5 = 0$};



There should be a direct way of drawning it, but you can draw 2 paths :

 \draw (0,0) -- (1,0);
 \draw[<-] (1,0) node[above]{$I_1$} -- (2,0);

Otherelse, you can use the [midway] option who write the node in the middle of the path.
